Solved

Jquery .show()

Posted on 2013-02-07
2
182 Views
Last Modified: 2013-02-12
$(floatingElem).show(function () {
	$(document).on('click', createCloseMask);
});

Open in new window


How do I get this script to not animate and just show?

At the moment it animates but I just want it to appear.

Thanks
0
Comment
Question by:Al4ddin2
2 Comments
 
LVL 5

Accepted Solution

by:
Pyromanci earned 250 total points
ID: 38865821
Set the duration

$(floatingElem).show(0, function () {
	$(document).on('click', createCloseMask);
})

Open in new window


you can also do:

jQuery.fx.off = true

Open in new window


but that will globally set all duration for the jquery effects to be 0. So any place you want animation you would have to set the durations. So it comes down to what you need more of. Animations or no animations.
0
 
LVL 1

Assisted Solution

by:StarbucksDrinker
StarbucksDrinker earned 250 total points
ID: 38868476
$(floatingElem).show(0);

Open in new window

will do it according to the JQuery docs.  If you need the inner function, then use
$(floatingElem).show(0, function () {	$(document).on('click', createCloseMask);
});

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question