Questions tagged as 'jquery'

3
answers

Selecting the src of an input using ID in JQuery

if(!$("#src-img[src='']")){ }else{ }; I would like to know what is wrong with this selection in if, in case, I want, if a value is set in the src attribute, it executes if, otherwise else. * That's why I put the '! '     
asked by 22.12.2016 / 17:58
2
answers

Pivot Tables with JQuery, JavaScript and Mysql

Good afternoon, friends, I'm having a problem, I can not register all the users in the database, just register the last one, how can I solve this problem? Index<formmethod="post" action="salvar.php">             Name       CPF     ...
asked by 14.12.2016 / 20:29
2
answers

Select text from textarea when clicking

How can I do that when I click on a given button , the text of a certain textarea or input is selected? I wanted answers with solutions with jQuery and also without jQuery (pure javascript).     
asked by 16.10.2015 / 14:11
2
answers

Compare attribute id with class and give .show in another div

I'm making a map of Brazil as svg, I need it when I click on a particular state it gives a show on a different div that will get information about that state. I need to compile the id of the path with the div class and display .show Follow...
asked by 27.03.2015 / 18:49
3
answers

Sorting select in alphabetical order with jQuery

I need to sort select alphabetically. I tried to use this function that I found on the internet function ordenarSelect(){ f$(".slc_Reuniao").html($("option", $(".slc_Reuniao")).sort(function(a,b){ return a.text == b.te...
asked by 25.09.2015 / 13:48
3
answers

WebService in javascript

How to consume a Web Service by javascript using Visual Studio? I've searched and found a way to do it with Jquery but I've never used it before. I need to consume this Web Service to search for information such as Addresses etc. I already...
asked by 12.02.2014 / 13:41
2
answers

Retrieve cookie expiration time in javascript or jquery

Is there any way to retrieve the time remaining for a cookie to expire in javascript or jquery?     
asked by 28.07.2014 / 23:37
2
answers

What is the difference between offset (). top and position (). top in jQuery?

What is the difference between $(el)offset().top and $(el).position().top in jQuery? I notice that in some cases the results are different.     
asked by 16.10.2015 / 18:02
3
answers

Why does it always return null?

I created this FIDDLE as a test. I have this li inside a variable and I want to add the class c2 to that same li var linha = '<li id= "id1" class="c1"> ' + '<div id="id2">1</div>' +...
asked by 17.06.2015 / 13:11
3
answers

How to check if Ajax's return is JSON or String?

My code looks like this: sendAjax(new FormData(this), function(retorno) { if(retorno.isArray) { $(".erro-login strong").text("ID: " + retorno.id + " usuário: " + retorno.usuario); $(".erro-login").show("slow");...
asked by 17.05.2016 / 20:44