Using jquery libraries on content loaded into Fancybox
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.
精彩评论