Hi!
I'm using the Silesia theme and it is cool!
I really want to tweak the jQuery code to allow the navigation to be open as default so you can close it if you want to.
I'm alright at modifying themes, but not so much when it comes to scripts at all...
Here's the script:
jQuery(document).ready(function(){
var flagClosed = true;
jQuery("#control").click(function(e){
if(flagClosed){ // closed
jQuery('#main-nav').animate({marginLeft: 0}, 300, function() {
jQuery('#control').html('-');
});
if(!(navigator.userAgent.indexOf('iPad') != -1)){
jQuery('#main-wrapper').animate({marginLeft: 200}, 300);
}
flagClosed = false;
} else {
jQuery('#main-nav').animate({marginLeft: -200}, 200, function() {
jQuery('#control').html('+');
});
if(!(navigator.userAgent.indexOf('iPad') != -1)){
jQuery('#main-wrapper').animate({marginLeft: 0}, 200);
}
flagClosed = true;
}
e.preventDefault();
});
});
I can't provide a link to the site i'm working on because of privacy issues, but you can preview it if you follow the link in the beginning of my post.
Thank you.