小编Qbe*_*ssi的帖子

猫头鹰轮播:到达最后一张幻灯片时运行功能

我正在尝试在达到旋转木马的最后一张幻灯片时运行一个功能.我已经设法使用afterInit和afterMove回调来循环旋转木马项目,但我只需要能够在循环结束时运行一个函数.

希望你能帮忙.

插件:http://owlgraphic.com/owlcarousel/#customizing

slideshow.owlCarousel({
            navigation: false, // Show next and prev buttons
            slideSpeed: 300,
            paginationSpeed: 400,
            singleItem: true,
            autoPlay: false,
            stopOnHover: false,
            afterInit : cycle,
            afterMove : moved,
        });

        function cycle(elem){
          $elem = elem;
          //start counting
          start();
        }

        function start() {
          //reset timer
          percentTime = 0;
          isPause = false;
          //run interval every 0.01 second
          tick = setInterval(interval, 10);
        };

        function interval() {
          if(isPause === false){
            percentTime += 1 / time;
            //if percentTime is equal or greater than …
Run Code Online (Sandbox Code Playgroud)

javascript jquery jquery-plugins

5
推荐指数
2
解决办法
4万
查看次数

使用带有JQuery的IPAD时更改类

当用户使用ipad时,如何在:link上更改类.

我正在使用滑出式灯箱来显示视频,但我希望在用户使用ipad时更改灯箱.

<a href="#" class="video">Watch</a>
Run Code Online (Sandbox Code Playgroud)

例如 网络版

/* Video overlay */
// Hide on load
$('.video-player').hide();

// Show the video player
$('.video').click(function() {
    $('.video-player').show('slow');
    return false;
});

//Hide the video player 
$('.close-video').click(function() {
    $('.video-player').hide('slow');
    return false;
})
Run Code Online (Sandbox Code Playgroud)

IPAD版本

/* Video overlay */
    // Hide on load
    $('.video-player').hide();

    // Show the video player
    $('.video').fancybox({
                'content'           : $('.video-player').html(),
                'titlePosition'     : 'inside',
                'transitionIn'      : 'none',
                'transitionOut'     : 'none',
                'overlayColor'      : '#fff',
                'overlayOpacity'    : 0,
                'scrolling'         : 'no',
                'onComplete'        : function(){

                    $('.pop-detail input.button, .pop-detail …
Run Code Online (Sandbox Code Playgroud)

html css jquery lightbox

4
推荐指数
1
解决办法
1729
查看次数

Javascript没有在IE7中加载

我在使用IE7加载JQuery时遇到了麻烦,在所有其他浏览器,firefox,safari,opera,ie8中运行良好,只是不在IE7中.

如果有人有任何想法,请告诉我.

非常感谢,

Q

这是在之前

<script  src="js/jquery.js" type="text/javascript"></script>
<script  src="js/plugins.js" type="text/javascript"></script>

<script type="text/javascript">
$(function(){
$('#coda-slider-1').codaSlider();
    $('#coda-services-1').codaSlider();
        $('#coda-work-1').codaSlider();

$("a[rel=rab]").fancybox({
                'transitionIn'  : 'fade',
                'transitionOut' : 'fade',
                        'titlePosition'     : 'over',
            });
$("a[rel=annsummers]").fancybox({
                'transitionIn'  : 'fade',
                'transitionOut' : 'fade',
                        'titlePosition'     : 'over',
            });
$("a[rel=sportingbet]").fancybox({
        'transitionIn'      : 'fade',
        'transitionOut'     : 'fade',
                'titlePosition'     : 'over',
    });
$("a[rel=ryman]").fancybox({
        'transitionIn'      : 'fade',
        'transitionOut'     : 'fade',
        'titlePosition'     : 'over',
    });
$('a').click(function() {
   var elementClicked = $(this).attr("href");
   var destination = $(elementClicked).offset().top;
   $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 1000 );
   return false;
    });
}); …
Run Code Online (Sandbox Code Playgroud)

javascript jquery internet-explorer internet-explorer-7

3
推荐指数
1
解决办法
2377
查看次数