问题
i am a dummie with fancy box and i need help iwth this
i load a form with fancybox automatically when the principal page is load but the content is reload every time i click in a select or input
Thanks for your help.
<script type="text/javascript">
$(document).ready(function() {
$("#yt").fancybox(
{
closeBtn : false,
closeClick : false, fancybox
openEffect : 'none',
closeEffect : 'none',
helpers : {
overlay : {closeClick: false}
}
}
).trigger('click');
});
</script>
<form name="form1" action="">
<ul>
<li>
<div>Number</div>
<select id="number" name="number">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
</select>
</li>
</ul>
</form>
PD: My english is not good!
回答1:
This is my solution if you need help
<script type="text/javascript">
$(document).ready(function() {
$.fancybox(
{
closeBtn : false,
href: "#yt",
closeClick : false, // prevents closing when clicking INSIDE fancybox
openEffect : 'none',
closeEffect : 'none',
keys : {//close : [27], // escape key
close : null, },
helpers : {
overlay : {closeClick: false} // prevents closing when clicking OUTSIDE fancybox
}
}
).trigger('click');
});
</script>
来源:https://stackoverflow.com/questions/20751950/fancybox-error-automatic-reload