How to know the version of the Jquery library just by viewing the codes made by other users?

1

I'm having a little jquery code here, offered by a member of that site that I ended up finding, and I do not know which version of the library I should load and run the code of others. I can not comment on the response he gave to another user because of my reputation, what library should I add?

$(document).ready(function(){

$("#ckAll").click(function()  {  // minha chk que marcará as outras

if ($("#ckAll").prop("checked"))   // se ela estiver marcada... 

$(".chk").prop("checked", true);  // as que estiverem nessa classe ".chk" tambem serão marcadas
     else $(".chk").prop("checked", false);   // se não, elas tambem serão desmarcadas

}); 
    
asked by anonymous 23.05.2018 / 20:59

1 answer

1
___ erkimt ___ How to know the version of the Jquery library just by viewing the codes made by other users? ______ qstntxt ___

I'm having a little jquery code here, offered by a member of that site that I ended up finding, and I do not know which version of the library I should load and run the code of others. I can not comment on the response he gave to another user because of my reputation, what library should I add?

%pre%     
______ ___ azszpr301369

I do not know if this is the ideal answer, but my tip would always be to use the most current version! For theoretically it always corrects and improves previous versions.

Then after you put the most current version you test to see if it works. If it turns okay. If it goes wrong, can u can refer to the official documentation if something like the code is deprecated . If u see in the console that has an error, u identifies the error, takes the name of the method, and consultation in the documentation here: link

Another tip is to look at the posting date of where u got the code and check the version date was on the list of Releases Dates link

    
___
23.05.2018 / 21:26