jQuery Lavalamp problem: when link is clicked and new php content is loaded, slider jumps back to original position (newbie q)
I am working on a site located here: http://temminktrainingcoaching.nl/beta/
There's a lavalamp menu, and when you click on the links it loads the pages by including php files in index.php (which is all content except for the logo and menu)
Structure is more or less as follows:
<!-- index.php -->
<div id="logo + menu"></div>
<div id="some content"></div>
<div id="include">
<!-- seperate php files are include here -->
</div>
Problem: When clicking on a link in the menu and loading a new php page, the lavalamp slider jumps back to it's original position, but it should stay at the clicked link.
I'm new to jquery, so it's just a try: but i thought the easiest way to fix this was to add a piece of javascript to each seperate php file which sets the lavalamp slide开发者_运维知识库r to the right link.
More info: I'm using this lavalamp: http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/
As I see, you can set this menu x position in php GET parameter, because it sets to zero position just when your page is being updated.
UPDATE: But anyway, you should edit your lavalamp plugin a little to set directly the position through your own function. Script is quite short to edit it.
精彩评论