Dynamically load content from url and div ID

$(document).ready(function() { $(".loadJob").click(function () { $(".content-loader").load($(this).attr("loadLink")); }); }); <div class="loadJob" loadlink="http://www.url.com/specific_page #port-content"></div> <div class="content-loader">Content will be loaded into this div</div>
The JQuery translates to when you click on an object with the class name loadJob to load the attribute value in loadlink and only the content from that URL contained within the object ID port-content into the class designated content-loader

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.