Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Jquery .show()

Posted on 2013-02-07
2
Medium Priority
?
193 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
Pyromanci earned 1000 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 1000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I have answered several questions lately that were solved utilizing the power of jQuery's AJAX functions, so I thought I would write an article demonstrating the ease of use. Why should I use jQuery as opposed to regular JavaScript? Now I know…
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
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)

610 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