How to fire a function before and after automatically in a jquery plugin?

FireFox jQuery problem.?

  • I have a simple jQuery slide show that simply listens for clicks on images and then replaces a main image with an alternative file path. This slide show works fine in all browsers I have checked it in so far. Opera, Safari, Chrome, IE9, IE8, IE7 even IE6 for crying out load yet Fire Fox refuses for it to work. What's got me puzzled is the fact the slide show partially works in Fire Fox but it won't display the first image in the list which is also the starter image. But it can't be a file path error as all other browser display it fine. I can't see it being a code error as again all other browsers are fine and the slide show works fine in them. So I was wondering is it possible Fire Fox my Fire Fox is having an off moment or is this something that could appear to everyone using Fire Fox. JQUERY CODE --------------------------------------... <script type="text/javascript"> $(document).ready(function(){ $('#one').click(function(){ $('#large').attr('src','gallery/ big_images/fusion_big.png'); }); $('#two').click(function(){ $('#large').attr('src','gallery/ big_images/gallery_index_big.png'); }); $('#three').click(function(){ $('#large').attr('src','gallery/ big_images/game_big.png'); }); $('#four').click(function(){ $('#large').attr('src','gallery/ big_images/gym_big.png'); }); $('#five').click(function(){ $('#large').attr('src','gallery/ big_images/old_portfolio_one_big.png')... }); $('#six').click(function(){ $('#large').attr('src','gallery/ big_images/old_portfolio_two_big.png')... }); $('#seven').click(function(){ $('#large').attr('src','gallery /big_images/web_sample_big.png'); }); $('#eight').click(function(){ $('#large').attr('src','gallery/ big_images/xstylez_gallery_big.png'); }); }); </script> #large refers to the big image in HTML and the #numbers refer to the appropriate image in line. But as I mentioned this works in all browsers except Fire Fox. A weird error. Thanks for any help.

  • Answer:

    FireFox has been having a boatload of problems lately. If I were you, I would try to either update your current FireFox version or revert to an older version prior to you seeing this issue. If needed, check the functionality in Chrome and that will tell you if it is a Mozilla compatibility problem. At that point, FF app will be the culprit.

Nik at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

FireFox has been having a boatload of problems lately. If I were you, I would try to either update your current FireFox version or revert to an older version prior to you seeing this issue. If needed, check the functionality in Chrome and that will tell you if it is a Mozilla compatibility problem. At that point, FF app will be the culprit.

Johnny

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.