I am using Jquery current version 2.1.x and .live() function is deprecated in new version according to the jQuery API. It is recommended to use 'on' instead. I have some javascript written with .live() function. I don't understand how to replace .live() with .on().
Below is my code:
jQuery
$('#container .pagination li.active').live('click',function(){
var page = $(this).attr('p');
RelatedCatLink(eleme,page);
});
$('#go_btn').live('click',function(){
var page = parseInt($('.goto').val());
RelatedCatLink(eleme,page);
var no_of_pages = parseInt($('.total').attr('a'));
if (page != 0 && page <= no_of_pages) {
} else {
alert('Enter a PAGE between 1 and '+no_of_pages);
$('.goto').val("").focus();
return false;
}
});