0

Hi Guys, I have a problem here. I can't manage to get the slidesshow display on my aspx.
After a few tried. take a look at tis link.

http://www.serie3.info/s3slider/

I m trying out this link and many people say it works. But still I failed to display..

mycode:

<div id="slider1">
                    <ul id="slider1Content">
                        <li class="slider1Image"><a href="">
                            <img src="images/image-1.jpg" alt="1" /></a> <span class="left"><strong>Title text 1</strong><br />Content text...</span></li>
                        <li class="slider1Image"><a href="">
                            <img src="images/image-2.jpg" alt="2" /></a> <span class="right"><strong>Title text 2</strong><br />Content text...Content text...Content text...Content text...Content text...Content text...Content text...Content text...Content text...Content text...Content text...</span></li>
                        <li class="slider1Image">
                            <img src="images/image-3.jpg" alt="3" /> <span class="right"><strong>Title text 2</strong><br />Content text...</span></li>
                        <li class="slider1Image">
                            <img src="images/image-4.jpg" alt="4" /> <span class="left"><strong>Title text 2</strong><br />Content text...</span></li>
                        <li class="slider1Image">
                            <img src="images/image-1.jpg" alt="5" /> <span class="right"><strong>Title text 2</strong><br />Content text...</span></li>
                            <div class="clear slider1Image">
                            </div>
                    </ul>
                </div>
<script type="text/javascript" src="Scripts/JScript.js"></script>
<script type="text/javascript" src="Scripts/s3Slider.js"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $('#slider1').s3Slider({
            timeOut: 4000
        });
    });
</script>
<style type="text/css" media="screen">
#slider1 {
    width: 720px; /* important to be same as image width */
    height: 300px; /* important to be same as image height */
    position: relative; /* important */
	overflow: hidden; /* important */
}

#slider1Content {
    width: 720px; /* important to be same as image width or wider */
    position: absolute;
	top: 0;
	margin-left: 0;
}
.slider1Image {
    float: left;
    position: relative;
	display: none;
}
.slider1Image span {
    position: absolute;
	font: 10px/15px Arial, Helvetica, sans-serif;
    padding: 10px 13px;
    width: 694px;
    background-color: #000;
    filter: alpha(opacity=70);
    -moz-opacity: 0.7;
	-khtml-opacity: 0.7;
    opacity: 0.7;
    color: #fff;
    display: none;
}
.clear {
	clear: both;
}
.slider1Image span strong {
    font-size: 14px;
}
.left {
	top: 0;
    left: 0;
	width: 110px !important;
	height: 280px;
}
.right {
	right: 0;
	bottom: 0;
	width: 90px !important;
	height: 290px;
}
ul { list-style-type: none;}
</style>

exactly the same but still failed.Somebody guide me please?

/* ------------------------------------------------------------------------
	s3Slider
	
	Developped By: Boban Karišik -> http://www.serie3.info/
        CSS Help: Mészáros Róbert -> http://www.perspectived.com/
	Version: 1.0
	
	Copyright: Feel free to redistribute the script/modify it, as
			   long as you leave my infos at the top.
------------------------------------------------------------------------- */


(function($){  

    $.fn.s3Slider = function(vars) {       
        
        var element     = this;
        var timeOut     = (vars.timeOut != undefined) ? vars.timeOut : 4000;
        var current     = null;
        var timeOutFn   = null;
        var faderStat   = true;
        var mOver       = false;
        var items = $("#slider1Content .slider1Image");
        var itemsSpan = $("#slider1Content .slider1Image span");
            
        items.each(function(i) {
    
            $(items[i]).mouseover(function() {
               mOver = true;
            });
            
            $(items[i]).mouseout(function() {
                mOver   = false;
                fadeElement(true);
            });
            
        });
        
        var fadeElement = function(isMouseOut) {
            var thisTimeOut = (isMouseOut) ? (timeOut/2) : timeOut;
            thisTimeOut = (faderStat) ? 10 : thisTimeOut;
            if(items.length > 0) {
                timeOutFn = setTimeout(makeSlider, thisTimeOut);
            } else {
                console.log("Poof..");
            }
        }
        
        var makeSlider = function() {
            current = (current != null) ? current : items[(items.length-1)];
            var currNo      = jQuery.inArray(current, items) + 1
            currNo = (currNo == items.length) ? 0 : (currNo - 1);
            var newMargin   = $(element).width() * currNo;
            if(faderStat == true) {
                if(!mOver) {
                    $(items[currNo]).fadeIn((timeOut/6), function() {
                        if($(itemsSpan[currNo]).css('bottom') == 0) {
                            $(itemsSpan[currNo]).slideUp((timeOut/6), function() {
                                faderStat = false;
                                current = items[currNo];
                                if(!mOver) {
                                    fadeElement(false);
                                }
                            });
                        } else {
                            $(itemsSpan[currNo]).slideDown((timeOut/6), function() {
                                faderStat = false;
                                current = items[currNo];
                                if(!mOver) {
                                    fadeElement(false);
                                }
                            });
                        }
                    });
                }
            } else {
                if(!mOver) {
                    if($(itemsSpan[currNo]).css('bottom') == 0) {
                        $(itemsSpan[currNo]).slideDown((timeOut/6), function() {
                            $(items[currNo]).fadeOut((timeOut/6), function() {
                                faderStat = true;
                                current = items[(currNo+1)];
                                if(!mOver) {
                                    fadeElement(false);
                                }
                            });
                        });
                    } else {
                        $(itemsSpan[currNo]).slideUp((timeOut/6), function() {
                        $(items[currNo]).fadeOut((timeOut/6), function() {
                                faderStat = true;
                                current = items[(currNo+1)];
                                if(!mOver) {
                                    fadeElement(false);
                                }
                            });
                        });
                    }
                }
            }
        }
        
        makeSlider();

    };  

})(jQuery);
3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by dineshsjce
0

The code you've provided, is working fine for me (however I just tested it in plain html file and not .NET).

Do you have a live link to show us what's going wrong?

I assume "JScript.js" is the jQuery file? If not you also need to include jQuery for it to work.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

If it works with that, you can download a copy at jQuery and host it locally if you wish.

Edited by MrDJK: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.