Hi I have a dynamically generated list of items generated by php mysql.
Below a content section there is a link basically "Load Related" link in this case the content is a bunch of thumbnails. I dont want to load the thumbs with the list when the page loads, instead I want to load them with Ajax using JQuery.
The code below loads the data triggered by clicking an anchor "a.related" into one statically named div eg "div#pimgs" however it populates all divs named #pimgs
$('a.related').bind('click', function(e) {
var url = $(this).attr('href');
$('div#pimgs').load(url);
e.preventDefault();
});
<a class="related32" href="external-content.php?id=32"></a>
<div id="pimgs32"></div>
I want to load data driven content into a dynimacilly named div eg"div#pimgs123" when you click an anchor named say "a.related123" or into a JQuery generated container directly below the anchor which is clicked.
Can someone help with this? Hope I'm making some sense...