I'm very new to jQuery (approx. 2 weeks) and I have a problem. I'll try to explain this so it can be understood (sorry if I use the wrong terminology).
I'm currently using .load() to grab <div>s from otherPage.html and append them to a <div> in mainPage.html. I am then using the CycleLite plugin to cycle through these <div>s
Code:
$(function() {
$('<div id="info">').load('otherPage.html #containAll', function() {
$(this).appendTo('#container');
$('#containAll').cycle();
});
});
All this working perfectly. What I need to do though is be able to grab these <div>s from different HTML pages. For example: grab #container01 from otherPage01.html, #container02 from otherPage02.html, etc. One of the main problems is also that I need to make it so new HTML pages can be added without adding more jQuery code.
Maybe if something like a +1 thing could be done (like
Code:
.load('otherPage' + 1 '.html, #container'...)
). I don't really know. I'm sort of stumbling around in the dark here. I've spent the last few days scouring google, but nothing seems to mention using .load() to pull from multiple HTML pages. Can it be done, or is there some other way around it?
Anyway, any help you can offer would be appreciated.