开发者

Using jquery libraries on content loaded into Fancybox

开发者 https://www.devze.com 2023-03-25 14:59 出处:网络
I haveform that is loaded into a FancyBox window. I would like to use a jquery InfieldLabels library on the form fields but I can\'t get it to work. It seems as if the script will not initialize on th

I have form that is loaded into a FancyBox window. I would like to use a jquery InfieldLabels library on the form fields but I can't get it to work. It seems as if the script will not initialize on the开发者_开发问答 Fancybox content. Here is the script I'm using to call the Fancybox:

$("a.bookingLink").fancybox({
'padding': 30,
'onComplete'    :   function() {
$(".inField").inFieldLabels();
}
});

Any suggestions??


Hmm, maybe try targeting the FancyBox popup contents, then the input fields... are you sure the class names are in the loaded content?

$("a.bookingLink").fancybox({
  padding    : 30,
  onComplete : function() {
    $("#fancybox-content .inField").inFieldLabels();
  }
});

Sharing the loaded content markup would help if the above doesn't fix the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消