Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Callbacks after Explode In Jquery
Old 04-27-2009, 10:55 AM Callbacks after Explode In Jquery
Skilled Talker

Posts: 68
Name: Avi Zolty
Location: Atlanta
Trades: 0
So I have a site, with a script that works fine... It looks like this
HTML Code:
 $(window).load(function(){
 $("p").fadeIn("slow", function() {$("p").click(function () {
      $("p").fadeOut("slow", function() {
      $("div").fadeIn("slow");
    }); 
});});
});
However, I find the constant fading in and out repetitive, and want the fadeOut to be an "explode" effect instead... to do that I replaced it with the hide("explode"... that I found from the Jquery Documentation- Only one problem: it doesn't work. I've tried everything (like specifying the "number:" in curly brackets... even thought 9 is already the default..etc) but nothing seems to work. The problem i think is that from the Jquery documentary I can't find out how to make a callback function so that the "divs" fade in AFTER the "p" has faded it out.... Here is the Jquery that I tried to use with the explode:
HTML Code:
 $(window).load(function(){
 $("p").fadeIn("slow", function() {$("p").click(function () {
      $("p").hide("explode", {}, 1000, function() {
      $("div").fadeIn("slow");
    }); 
});});
});
and here is my site (as it is, with the fadeOut script)
http://www.liophant.com
Thanks a lot for any help!
__________________
"If you say something interesting, people will remember your name" ~ Anonymous


Please login or register to view this content. Registration is FREE
.asp <- Irony
Zoltar1992 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-27-2009, 01:43 PM Re: Callbacks after Explode In Jquery
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
"explode" is a part of jQuery UI, not the jQuery core. You need to include the core effects from jQuery UI to be able to use them.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 04-27-2009, 04:29 PM Re: Callbacks after Explode In Jquery
Skilled Talker

Posts: 68
Name: Avi Zolty
Location: Atlanta
Trades: 0
Thank you very much.. I didn't realise you had to do that.
However I added in the script: <script src="http://dev.jquery.com/view/tags/ui/latest/ui/effects.core.js"></script>
...but it still didn't work so I then added effects.explode....
<script src="http://dev.jquery.com/view/tags/ui/latest/ui/effects.explode.js"></script>
Now it seems to be working but won't explode?
__________________
"If you say something interesting, people will remember your name" ~ Anonymous


Please login or register to view this content. Registration is FREE
.asp <- Irony
Zoltar1992 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Callbacks after Explode In Jquery
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.43281 seconds with 12 queries