I'm loading multiple items from a database using php. Each item has a 'category' attribute. I'm trying to run a jquery function, which loads a php script, for each iteration of an item. The script fetches all category options from the databse and populates a <select> object.
The reason for this roundabout method is that there is an option at the top of the page to add a new category. If a new category is added, I want to reload the above function for every item, so the new category is added to the <select>.
The mouse enter and leave events are all working great.
What I'm struggling with is when the user clicks on a link, I want the mouse enter and mouse leave events for the clicked link to stop and for the background image to stay at 0 -85px. I tried that in the click event above but I have no idea how to go about this.
I'm running an AJAX and jQuery script which seems to be conflicting with another query plugin called fancy box (used to display images) which is supposed to run if a link is clicked in the portfolio section of the site. If I remove the AJAX script then the fancy box works.
The AJAX and jQuery script thats causing the problem is found in the ajax.js file. The AJAX is used to load and animate content of the various pages. The other jQuery script is used to fade in content of different divs on the home page.
I've tried using the .noConflict method with various combinations throughout the .js files but to no avail.
I have a number of links with content related to each link. When the user clicks on a link, the current content fades out and the new content (for the clicked link) fades in. This works alright but when the page is first loaded and I click on the about or content link, the hidden content for the clicked link flashes in and out before it fades in correctly. This seems to only happen the first time the links are clicked.
The code is below
<script type="text/javascript">
$(document).ready(function() {
$('#navigation a').click(function(){
var $content = '.'+$(this).attr('class')+'content';
if (!$($content).hasClass('active'))$($content).fadeIn(2000).addClass('active');
I'm using Jquery to create a rollover effect on 2 images (placed on top of each other) to fade the bottom image in on a mouseover and out on a mouse out. Clicking the faded in image also opens a fancybox gallery. The problem is that sometimes the animation (the fade in and out) gets stuck after closing the fancybox window and the mouseover doesn't work anymore.