,

Jquery version differences

Contents


From 1.3.2 to 1.4.1

Posting data: Now it is JSON!

When posting parameters must be in JSON format, with quote marks.

Was 1.3.2

ncf:1,
jx:'loadSaveCodeBody',
rules_id:$('#rules').val(),

Now 1.4.1

"ncf":1,
"jx":'loadSaveCodeBody',
"rules_id":$('#rules').val(),
"codebody":$('#CodeBody_place').val()


Selectors are more strict

If you have two elements with the same ID, whereas before you could use specific selectors, now they simply won't work.

Example HTML:

<!-- -->
<div class='you'>
   <div id='1'></div>
</div>

<!-- -->
<div class='me'>
   <div id='1'></div>
</div>

Was 1.3.2

$('.me #1').addClass('background-yellow');

Now 1.4.1

HTML has to change:

<!-- -->
<div class='you'>
   <div class='1'></div>
</div>

<!-- -->
<div class='me'>
   <div class='1'></div>
</div>

As well as the jQuery selector has to change as well.

$('.me .1').addClass('background-yellow');