ajax - Click to load more not working in jquery mobile 1.11.1 -


i have news app displays headlines on index page , on click of link "load more loads more headline".i updgrade jquery mobile version 1.8.3 1.11.1 , "load more" link fails load more headlines

$(function() { //more button $('.more').live("click",function()  { var head_id = $(this).attr("id"); if(head_id) { $("#more"+head_idu_pic_id).html('<img src="photo_loader.gif" />');  $.ajax({ type: "post", url: "moreheadlines.php", data: "lastmsg="+ head_id,  cache: false, success: function(html){ $("ol#updates").append(html); $("#more"+head_id).remove(); } }); } else { $(".morebox").html('the end');  }   return false;   }); }); 

this jquery version i'm using

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" /> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> 

if, chance, "id" updates/changes, current versions of jquery not use updated values set attribute. thing keep in mind attributes can strings while properties can type.

to avoid issue use .prop() instead of .attr(). recommend reading more @ link provided.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -