I’m not all the familiar with the .load functionality of jQuery, but it would be REALLY cool if I could do what’s in the url.
Basically, I’ve got a PHP loop that cycles for 10 pieces of content per page. This is based on a Query String
http://domain.com/page/?offSet=0&rpp=10
will load the 10 most recent bits of content (rpp=10)
http://domain.com/page/?offSet=10&rpp=10
this loads the content 11-20 (notice offset=10). Offset 20 will produce 21-30, etc.
BASICALLY – I’ve got some links at the bottom that use PHP math to determine the current offset and add 10 or subtract 10.
Currently, they reload the whole page (gross). Can I use .load with the query strings to grab the container div with the other content?
Yes, you can do that. You can add a selector after your URL to indicate only what section of the loaded HTML that you want to insert into your current page’s container.
For example:
Which will load only the contents of
#containerfrom your loaded resource into#myGridData.See the jQuery API for more details.