Solved

slideLeft and fadeIn

Posted on 2012-04-03
4
449 Views
Last Modified: 2012-08-13
I wounder if there is a possibility to slide left and also fadeIn at the same time.
I have 5 text boxes i am trying to slide them from left to right but to make it more elegant i trying to play with opacity or fadeIn.

i would be thankful is someone have a suggestion.

$("#slides div").hide();
	$('#slide1').slideLeftShow();

Open in new window

0
Comment
Question by:Refael
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:designatedinitializer
ID: 37804427
do it like this:
<head> 
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script> 
    <script> 
        // wait for the DOM to be loaded 
        $(document).ready(function() { 
			$("#slides div").animate({
    opacity: 0,
    left: 100,
  }, 1000);
		});
    </script> 
</head> 
<body>
<div id="slides">
	<div style="width:50px;height:50px;background-color:red;display:block;position:relative;left:0px;">aa</div>
</div>
</body>

Open in new window

0
 

Author Comment

by:Refael
ID: 37804454
Hi designatedinitializer,

Thank you.

I need it to fadeIn while it slideLeft and not fadeOut.
0
 
LVL 7

Accepted Solution

by:
designatedinitializer earned 500 total points
ID: 37805372
You just need to invert the settings.
Like this:
<head> 
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script> 
    <script> 
        // wait for the DOM to be loaded 
        $(document).ready(function() { 
			$("#slides div").animate({
    opacity: 1,
    left: 100,
  }, 1000);
		});
    </script> 
</head> 
<body>
<div id="slides">
	<div style="width:50px;height:50px;background-color:red;display:block;position:relative;left:0px;opacity:0;">aa</div>
</div>
</body>

Open in new window

0
 

Author Closing Comment

by:Refael
ID: 37821863
Thank you!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
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…

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now