Robert Mayers
09-26-2011, 09:15 PM
Greetings too all, here is my personal website (http://www.robertmayers.co.uk).
Situation
I have a relatively simple few lines of javascript that allow me to slideToggle a div (#main-content-info) into (and back out of) display. The div begins with its display set to none and when the header buttons at the top of the page are clicked, (#main-content-info) slides into display.
Problem
The function stops working when you navigate to other pages (http://robertmayers.co.uk/browse-portfolio/bargain/) in the site (by using the "Browse Portfolio" drop down).
Question
How do I allow this function to perform on all pages of the site?
Please see code below.
$(document).ready(function(){
$(".slide-button-one").click(function(){
$("#main-content-info").slideToggle(600,function(){
$("#main-content-portfolio").toggle();
});
return false;
});
});
Thank you for your time and I would appreciate any responses, long or short – including "don't do it like that, do it like this."
Rob
Situation
I have a relatively simple few lines of javascript that allow me to slideToggle a div (#main-content-info) into (and back out of) display. The div begins with its display set to none and when the header buttons at the top of the page are clicked, (#main-content-info) slides into display.
Problem
The function stops working when you navigate to other pages (http://robertmayers.co.uk/browse-portfolio/bargain/) in the site (by using the "Browse Portfolio" drop down).
Question
How do I allow this function to perform on all pages of the site?
Please see code below.
$(document).ready(function(){
$(".slide-button-one").click(function(){
$("#main-content-info").slideToggle(600,function(){
$("#main-content-portfolio").toggle();
});
return false;
});
});
Thank you for your time and I would appreciate any responses, long or short – including "don't do it like that, do it like this."
Rob