Questions tagged as 'jquery'

1
answer

Help with JavaScript filter

I have the following JavaScript code: JSON var json = { "tpAmbiente":null, "hotelPesquisa":[ { "dtEntrada":"20170510", "dtSaida":"20170511", "hotel":{ "id":94...
asked by 10.05.2017 / 20:44
1
answer

Copy text when clicking on a DIV [duplicate]

How do I, with JQuery preferably, click on the wave class div: $('ola').click(function(){ //FUNÇÃO DE COPIAR AQUI }); Does it copy a text? For example, when you click on the wave class div, it copies the text "Hello World"     
asked by 10.05.2017 / 13:15
1
answer

Creating tables through div

I would like to create a table structure that can have a variable amount of columns, for example, one hour might have only 3 columns and at another time it may have 5 or 6 columns, that number is not limited, that amount columns will not change...
asked by 10.05.2017 / 14:38
1
answer

Data jQuery problems

I'm having a small problem in my jquery code, I wanted to do a sum in which I put the value in the input + the span value in one div and generate that in another span, but it does not show me results. p> HTML <div class="media-body"> &...
asked by 27.04.2017 / 15:24
1
answer

compare two dates in jQuery

Good morning $("#salvar").on('click', function(e){ var startDate = new Date($('#data_abertura').val()); var endDate = new Date($('#data_encerramento').val()); alert(startDate); if (startDate > endDate){...
asked by 28.04.2017 / 06:31
1
answer

Function that passes arguments dynamically to callback

How to pass arguments in a callback function (usually anonymous function)? Maybe it's hard to understand, so I'll give you an example here. I always see this in libraries like jQuery, but I do not understand how it works in "pure" JS. For...
asked by 07.06.2017 / 11:36
1
answer

How can I add paragraphs in a TEXTAREA TAG?

$("#text").on("focus", function(){ $(this).keypress(function(e){ if(e.keyCode == 13 | e.which == 13){ //this.value += '</p><p>'; document.execCommand('formatBlock', false, 'p');...
asked by 13.04.2017 / 14:20
1
answer

Help with DateTangePicker in jQuery

I'm using the jQuery Date Range Picker on a form. Follow the code in jsfiddle My problem is when I click on the input Input appears the date range picker normally, but when I click on the input date, I need it to close and open on the outpu...
asked by 05.06.2017 / 23:03
1
answer

Check if an email was typed in jQuery text field [duplicate]

Good afternoon! How do I check if an email was typed inside a text field? I need to identify when the user clicks off the field, if an email has been typed or just a name, for example. Thank you!     
asked by 19.04.2017 / 22:07
2
answers

how to add class in a specific input text element?

I have a page with lots of inputs. <form action=""> <div class="row"> <label for="texto">texto</label> <input type="text" class="nome"> <span class="repositorio"><span class="efeito"></span...
asked by 12.04.2017 / 19:18