English 中文(简体)
j 食堂——网络问题
原标题:jQuery Gallery - Webkit problems

Okay。 因此,我写了一篇少许的“Query gallery scroller”的演讲。 它精彩地在北纬角开展工作,但在 Chrome或沙捞中则做 t。

这里指的是:

http://thehousinggroup.info/our-gallery/bathroom-renovations/gallery-1/

Here:

    var imageQuantity = $( .galleryBox img ).size() //finds the number of images
    var wrapWidth = imageQuantity * 610 +  px  //sets inner wrapper to image width*no. of images

    //Formating
    $( .galleryBox img )
        .hide()
        .unwrap()
        .wrapAll( <ul></ul> )
        .wrapAll( <div id="innerWrap"></div> )
        .wrap( <li></li> );//wraps images in ul and div, strips off the <p> that WordPress adds
    $( #innerWrap ).css({
         width  : wrapWidth,
         position  :  relative 
    });
    $( .galleryBox ).css({ overflow  :  hidden }); //this css will be relegated to the stylesheet eventually...
    $( .galleryBox ul ).css({ list-style  :  none });
    $( .galleryBox li ).css({
         float  :  left ,
         margin-right  :  10px 
    });
    $( .galleryBox img ).show(); //shows the images once the formatting is complete

    //Scroll Controls

    var currentNumber = 1; //this is for the "1 of 4" counter
    var fullNumber = imageQuantity;

    $( #innerWrap ).before( <p id="scroller"><a id="prevButton" href="">previous</a> <span id="currentNumber">  + currentNumber +  </span> of   + fullNumber +  <a id="nextButton" href="#">next</a></p> ); //this places the next, previous, and 1 of # counter buttons 
    $( #nextButton ).click(function(event){
        event.preventDefault();
        var wrapPosition = parseInt($( #innerWrap ).css( right ));
        var stopPoint = (fullNumber-1)*610;
        if(wrapPosition < stopPoint) { //sets the scrolling to stop at last image
            $( #innerWrap ).animate({ right  : "+=610px"});
            ++currentNumber;
            $( #currentNumber ).empty().html(currentNumber); //sets the counter to the proper number
        }
    });
    $( #prevButton ).click(function(event){ //same as above, reversed out for the previous button
        event.preventDefault();
        var wrapPosition = parseInt($( #innerWrap ).css( right ));
        var stopPoint = (fullNumber-1)*610;
        if(wrapPosition > 0) {
            $( #innerWrap ).animate({ right  : "-=610px"});
            --currentNumber;
            $( #currentNumber ).empty().html(currentNumber);
        }

    });

我会把 c放在风格上,但现在又是如何建立的。 如果你再听说过的话,我!

感谢。

最佳回答

这一条线引起了我的关注:

$(#innerWrap ).animate({右边:“-=610px”);

尤其因为没有“权利”财产最初在网络Kit上建立。

2. 进行上述计算:

right_pos = doTheMathHere;
$( #innerWrap ).animate({ right  : rigt_pos});
问题回答

code:var PackPosition = parseInt ($ (#innerWrap ).cssss (right );

因此,它绕过了这一圈子:

        if(wrapPosition < stopPoint) {
            $( #innerWrap ).animate({ right  : "+=610px"});
            ++currentNumber;
            $( #currentNumber ).empty().html(currentNumber);
        }

回答我自己的问题

我认为,我是这样说的。 它必须符合包(包)命令。 我打算在<代码>和t;ul>内包装;div>,但正相反。 这个问题与Webkit有关。 它是这些问题中的一个。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签