English 中文(简体)
当我不希望打开网吧时
原标题:fancybox opening when I don t want it to

I m a Jeopardymmer, and I m using the FancyBox Light Box plugin to show all the questions in.

我试图提出一个奖金问题。 一旦25个点全部出现,这个问题就应该消失。 目前使用的大型<代码>if说明:

if($( #html5_100 ).is( :hidden ) &&$( #html5_200 ).is( :hidden ) &&$( #html5_300 ).is( :hidden ) &&$( #html5_400 ).is( :hidden ) &&$( #html5_500 ).is( :hidden ) &&$( #attr_100 ).is( :hidden ) &&$( #attr_200 ).is( :hidden ) &&$( #attr_300 ).is( :hidden ) &&$( #attr_400 ).is( :hidden ) &&$( #attr_500 ).is( :hidden ) &&$( #tf_100 ).is( :hidden ) &&$( #tf_200 ).is( :hidden ) &&$( #tf_300 ).is( :hidden ) &&$( #tf_400 ).is( :hidden ) &&$( #tf_500 ).is( :hidden ) &&$( #dtag_100 ).is( :hidden ) &&$( #dtag_200 ).is( :hidden ) &&$( #dtag_300 ).is( :hidden ) &&$( #dtag_400 ).is( :hidden ) &&$( #dtag_500 ).is( :hidden ) &&$( #tag_100 ).is( :hidden ) &&$( #tag_200 ).is( :hidden ) &&$( #tag_300 ).is( :hidden ) &&$( #tag_400 ).is( :hidden ) &&$( #tag_500 ).is( :hidden )){
$( #bonus ).fancybox({ 
 transitionIn  :  elastic ,
 transitionOut  :  elastic , 
 hideOnOverlayClick :false,
 hideOnContentClick :false,
 showCloseButton  : false,
 overlayOpacity  : 1
}).click();
}

而Im试图使用$(#ID ).is(:hidden );

我将其中25个座标放在每个纽克的每个功能中。 问题是,一旦我点击,就打开了这一ancy。 是否有办法制止这种情况?

如果你们需要更多的帮助,我就能够把我的游戏带上,只给你们一个联系。

最佳回答

&&$( #html5_200 .is(:hidden )与你的代码相同? 您需要将这些“&$”改为&&$ ( #html5_200 .is(:hidden )(&&>>,)。

edit: whay did you added the .click() after the call to $( #bonus ).fancybox{ ... }? try to remove this from your code because i thik the call to the .click() function trigger this. if it doesn t help either, i will have to see the rest of your code to figure it out

问题回答

似乎你们的法典正在发挥作用,因为至少对我来说,那可能是那页上没有id?

而且,如果所有潜伏者都隐藏起来,也许更好的检查方法就是通过他们所有的人。 这种方法还便于以最低努力补充问题(demo):

var checkDivs = function() {
    var i, j, divs =  html5 attr tf dtag tag .split(   );
    // loop through div names
    for (i = 0; i < divs.length; i++) {
        j = 1;
        // loop through all numbered div names (adding 100 each time)
        while ($( #  + divs[i] +  _  + (j * 100)).length) {
            // check if hidden
            if (!$( #  + divs[i] +  _  + (j * 100)).is( :hidden )) {
                return false;
            }
            j++;
        }
    }
    return true;
};




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签