?
Solved

slideLeft and fadeIn

Posted on 2012-04-03
4
Medium Priority
?
469 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 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
Suggested Courses
Course of the Month16 days, 2 hours left to enroll

850 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