Questions tagged as 'javascript'

1
answer

How do I get a single div with the same class in jquery?

How can I use the click function in jquery with classes of the same name? Type click and appear element only in the clicked div and not in the others. I've already tried using $(this).next('bla').addClass('blablabla') and I was not suc...
asked by 01.04.2018 / 06:36
2
answers

Button to select which carousel to display

I created two illustration carousel and another carousel of a house, and I need two buttons, Illustration and Plant, when loading the page, will show the carousel illustration as main, and when clicking on the plant carousel should hide illustra...
asked by 28.03.2018 / 16:29
2
answers

I have questions that when clicked on it, the onclick event is called a div that is in display - none appears

HTML <a href="#" onclick="Resposta()"> <li>Como comprar passagem?</li> </a> <div class="resposta_duvida">Apareça por favor</div> CSS .resposta_duvida{ display: none; } JAVASCRIPT <script&g...
asked by 26.03.2018 / 00:19
2
answers

Generate dynamic borders

I have the following form: <input type="number" min="0" value="0" /> <input type="number" min="0" value="0" /> <input type="number" min="0" value="0" /> <input type="number" min="0" value="0" /> <button>GERAR</...
asked by 26.03.2018 / 05:33
4
answers

How do I get the highest value in an array with JavaScript?

Hello, I created a function that should iterate through an array and return the highest value. It even works in some cases, but depending on the order of the array it returns the wrong value. I know that I can use the max method of the Math o...
asked by 19.03.2018 / 16:14
1
answer

Help in Jquery code type text alone

I found the code on the internet to type a text by jquery alone, but I want to add a delay in it to just start typing when the page scrolls in the section I want, how to add this function? js code var div = document.getElementById('texto');...
asked by 22.03.2018 / 23:27
1
answer

Ajax in MVC - Select

I have a problem loading the select fields in my project. My forms are all done with Razor and only the select's (combobox) I load by ajax. Problem: When I start the form the ajax event to load the combos is triggered before I get the d...
asked by 21.03.2018 / 15:09
1
answer

How to select attributes and values in select

How to select attribute (oblige) of the category that is set, Whenever I click the button !! var btn = document.querySelector("#btn"); var categorias = document.querySelector("#categorias"); btn.addEventListener("click", selecObriga)...
asked by 17.03.2018 / 22:18
1
answer

Error in formatting date function

I have this function: function formatarData(data) { var d = new Date(data), mes = '' + (d.getMonth() + 1), dia = '' + d.getDate(), ano = d.getFullYear(); if (mes.length < 2) mes = '0' + mes; if (di...
asked by 22.03.2018 / 01:51
1
answer

How do I make an alert near the return date?

I'm developing a library system for an institution, but I'm having trouble alerting when the return date is near or leaving the fields in red when a student does not deliver the book on a given day. Controller <?php namespace App\Http...
asked by 15.03.2018 / 06:47