jquery - Ajax load page without refresh -


I'm looking for information on what is the easiest way to update page content using jquery + ajax Just want to update the # container content, but not a full page.

I am in Ajax. "

Thank you.

My Jquery Code

  & script> $ (document) .ready (function () {// $ ('. Line'). Load ('services.html'); $ ('. Nav_link'). Click (function () {var page = $ (this) .attr ('href'); $ ( 'Line'). Load (page); return false;});});  

HTML:

  

services .html:

  
navel roll = "navigation" category = "nav"> gt; class = "nav_link" "Href =" services.html "& gt; div class =" navi_line "> gt; & quot; paasalagus & lt; / a & gt; & Lt; One class = "nav_link" href = "contacts.html" & gt; & Lt; Div class = "naval_line" & gt; & Lt; / Div & gt; KONTAKTAI & lt; / A & gt; & Lt; / Neo & gt; & Lt; Div class = "result" & gt; Gsdgdsgsdgdsgds gds gdsg dsg sd gds g sdgsd gdsg sd gsd & lt; / Div & gt; & Lt; / Div & gt;

Try

  $ ('.row ') .on ("click", "nav_link", function (e) {e.preventDefault (); // cancel page page = $ (this) .attr (' href '); $ (' .row ') .load (page);});  

Since Click on new link on


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -