Hi there, I'm using the jQueryUI select menu tool which is currently still under development. All is working well except that when you click the dropdown to show the options, the web page scrolls to the bottom of the page and the browser kind of... 'flashes' as if the styling is all being reloaded or something.
The effect fades the rolled over thumbnail to 50% opacity and a large version of the image appears by the mouse pointer. If you move the mouse whilst still hovering over the thumbnail, the large image moves with your mouse. Once your mouse leaves the thumbnail, the large iamge dissapears. I ahd this working perfectly when I followed the tutorial but now it's not working, nothing happens when you roll over the images. Infact, I tried to just change the initial opacity of the thumbnails to 50% (before any of the roll over handling code is run) and even that doesn't work.
Is this something to do with it being loaded with AJAX first?
Ok, so I have some code which listens for when an anchor tag in a nav menu is clicked. The content pane is hidden using slideUp. It then removes the old data and loads the new data using AJAX into the content pane. The content pane then slides down again with the new content shown.
All works well except the animation is a bit screwed. When the content pane slides back down (after getting new content), it slides down to it's previous size (which is was when it had the previous content in it), it then jumps to the right height once the animation is finished.
Here is my code:
$(document).ready(function() {
//Check for hash in URL.
var hash = window.location.hash.substr(1);
var href = $('#navBar a').each(function(){
var href = $(this).attr('href');
if(hash==href.substr(0,href.length-5)){
var toLoad = hash+'.html #contentWrap';
$('#contentWrap').load(toLoad)
}
});
$('#navBar a').click(function(){
var toLoad = $(this).attr('href') + ' #contentWrap';
I am still experimenting but I have a href which runs a function with a delay of 1 seconds, in that time; jQuery is also playing a 1 second animation. The new page is then loaded successfully. However, when I navigate with the browser Back button, how would I make sure that the initial page is reset to it's inital state as at the moment it appears as it would after the animation (which occurs when the href is clicked) has played.
Hey, I'm trying to make a div animate using the slideToggle function which runs after a link is clicked. For now it is just when any link is clicked because I'm just trying to get it to work. However, When I click a link I have made, nothing happens.
Here is my code and css below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I am very new to jQuery and am trying to learn by incorporating and editing things I have done in tutorials into an actual website design.
The problem I am having is how to get some text to slide down from behind an image after it is clicked. So for instance; I'd have an image which says "Things to do" or whatever then when the image is rolled over/clicked some text will slide down from behind the image with links to pages of different things to do.