www.webdeveloper.com
Results 1 to 2 of 2

Thread: Can't understand picture rotation...

  1. #1
    Join Date
    Nov 2013
    Posts
    4

    Can't understand picture rotation...

    It looks like it easy picture rotation but I can't understand it as it uses just first() and next() filters, so how it hitch up other pictures?
    Code:
    <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
    <script>
         $(document).ready(function() {
              $("#slides img").slice(1).hide();
    			
              setInterval(function(){
    	     $("#slides img").first().fadeOut(1000)
    	     .next().fadeIn(1000)
    	     .end()
    	     .appendTo("#slides");
    	  }, 2000);
         });
    </script>
    
    <body>
       <section>
           <h1>Current Books Slide Show</h1><br>       
           <div id="slides">
               <img src="images/book1.jpg" alt="SQL Server 20128 for Developers">
               <img src="images/book2.jpg" alt="PHP and MySQL">
               <img src="images/book3.jpg" alt="HTML5 and CSS3">
               <img src="images/book4.jpg" alt="JavaScript and DOM Scripting">
               <img src="images/book5.jpg" alt="Java Programming">
           </div>
        </section>
    </body>
    </html>
    css optional:
    Code:
    /* the default styles for the document */
    body {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 85%;
    	margin: 0 auto;
    	padding: 20px;
    	width: 400px;
    	border: 3px solid blue;
    }
    	
    h1 {
    	margin: 0;
    	padding: 0;
    	font-size: 140%;
    }
    	
    /* the styles for the section */
    section {
    	height: 300px;
    }
    /* the styles for the slide show */
    #slides {
    	
    }
    #slides img {
    	position: absolute;
    }

  2. #2
    Join Date
    Nov 2013
    Posts
    4
    got it... never mind... probably i am just tired...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles