javascript - when I click on the div that div should get refreshed and refreshed data should be displayed -


$(document).ready(function () {      var j = jquery.noconflict();      j('.refresh').click(refreshdiv);      j('.refresh').css({          color: ""      });      function refreshdiv() {          j.ajax({              url: "refresh.php",              cache: true,              success: function (html) {                  j(".refresh").html(html);             }         });     } }); 

i have code ,but confused how display div gets refreshed.please provide me code or links refer.i making site in want update score when refresh div using ajax.

in ajax request specify datatype:'html' shown :-

 j.ajax({         url: "refresh.php",         datatype:"html",         cache: true,         success: function (html) {             j(".refresh").html(html);         }  }); 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -