www.webdeveloper.com
Results 1 to 6 of 6

Thread: Need Help

  1. #1
    Join Date
    Jul 2012
    Posts
    4

    Need Help

    I am new to Dreamweaver and trying to make a photo slideshow with javascript but failed so far, I have downloaded some script but fail to properly insert but somehow I did manage to do that it gives ERROR IN INTERNET EXPLORER
    I have to unblock to view the slideshow

    here is the code
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Test slideshow</title>
    <script type="text/javascript" src="../../Desktop/simple-jquery-slideshow/jquery-1.2.6.min.js"></script>
    
    <script type="text/javascript">
    
    /*** 
        Simple jQuery Slideshow Script
        Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc.  Please link out to me if you like it :)
    ***/
    
    function slideSwitch() {
        var $active = $('#slideshow IMG.active');
    
        if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
    
        // use this to pull the images in the order they appear in the markup
        var $next =  $active.next().length ? $active.next()
            : $('#slideshow IMG:first');
    
        // uncomment the 3 lines below to pull the images in random order
        
        // var $sibs  = $active.siblings();
        // var rndNum = Math.floor(Math.random() * $sibs.length );
        // var $next  = $( $sibs[ rndNum ] );
    
    
        $active.addClass('last-active');
    
        $next.css({opacity: 0.0})
            .addClass('active')
            .animate({opacity: 1.0}, 1500, function() {
                $active.removeClass('active last-active');
            });
    }
    
    $(function() {
        setInterval( "slideSwitch()", 2500 );
    });
    
    </script>
    <<style type="text/css">
    
    /*** set the width and height to match your images **/
    
    #slideshow {
    	position: relative;
    	height: 263px;
    	padding: 0px;
    	width: 350px;
    	margin-right: auto;
    	margin-left: auto;
    }
    
    #slideshow IMG {
        position:absolute;
        top:0;
        left:0;
        z-index:8;
        opacity:0.0;
    }
    
    #slideshow IMG.active {
        z-index:10;
        opacity:1.0;
    }
    
    #slideshow IMG.last-active {
        z-index:9;
    }
    </style>
    
    </head>
    
    <body style="font-family: Arial, Sans-serif, sans;">
    <!-- this will work with any number of images -->
    <!-- set the active class on whichever image you want to show up as the default 
    (otherwise this will be the last image) -->
    
    <div id="slideshow">
        <img src="New Image/image 1_big.jpg" alt="Slideshow Image 1" class="active" />
        <img src="New Image/image 2_big.jpg" alt="Slideshow Image 2" />
        <img src="New Image/image 3_big.jpg" alt="Slideshow Image 3" />
        <img src="New Image/newzealand01_1024x768.jpg" alt="Slideshow Image 4" />
    </div>
    </body>
    </html>
    even some templates gives the same message
    I am looking something like this
    Code:
    www.iccwasb.org
    any kind of help or a good tutorial would be appreciated
    thanks in advance

  2. #2
    Join Date
    Feb 2011
    Posts
    231
    Hi,
    Try the jQuery Cycle Plugin, URL: jquery.malsup.com/cycle/ , it is easy to use.

  3. #3
    Join Date
    Jul 2012
    Posts
    1
    Tell me exactly what error you are getting??
    And what is the version of IE you are using.??
    I have tried the same code in IE9. Its working perfect.

  4. #4
    Join Date
    Jul 2012
    Posts
    4
    Quote Originally Posted by MarPlo View Post
    Hi,
    Try the jQuery Cycle Plugin, URL: jquery.malsup.com/cycle/ , it is easy to use.
    thanks bro

  5. #5
    Join Date
    Jul 2012
    Posts
    4
    Quote Originally Posted by gopiktrtech View Post
    Tell me exactly what error you are getting??
    And what is the version of IE you are using.??
    I have tried the same code in IE9. Its working perfect.
    IE 8
    I have to un block the content every time I open the page in IE

  6. #6
    Join Date
    Jul 2012
    Posts
    4
    sorry not to mention I have not yet uploaded to server

Thread Information

Users Browsing this Thread

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

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