views:

123

answers:

2

This helpful idea from Andy Gaskell supports 50% of my next question:

I'd like to load posts dynamically with WordPress. Fetching them with Andy's function does work, but How do I bind the load to each and every one of the posts?

Can I insert PHP generated content (post permalink, for example) to the JS script?

Thank you.

A: 

Maybe Jquery and Ajax in Wordpress Plugins?

songdogtech
A: 

Got it:

$("#triggerDIV a").click(function(id){
    event.preventDefault(); // prevent a element from executing
    var id = this.getAttribute('href'); // get the link
    $("#targetDIV").load(id); // load it
});
konzepz