I am trying to open a fancy box and everything is in place except with an issue that fancy box is not opening second time.
for first time it is getting opened perfectly fine, moment i try to open it second time it does not open it, here is the code i have
jQuery(document).ready(function() {
jQuery("#destination_Weather").fancybox({
'titlePosition' : 'inside',
'autoScale' :true,
'autoDimensions' : true,
'width' : 600,
'height' : 'auto',
'transitionIn' : 'none',
'transitionOut' : 'none'
});
});
<div style="display: none">
<div id="destinationWeather">
<?php if(!empty($lat_long_cordinates)) {
echo displayDestinationWeather('',$lat_long_cordinates);
} ?>
</div>
// one more div used for another fancybox content
</div>
<a href="#destinationWeather" id="destination_Weather">link </a>
I am not sure why this is happening, but when i click link second time, it is reloading whole page from fresh. Not sure of this is an issue with fancy-box implementation or some wrong implementation with PHP.
There is one more thing i noticed, when i close pop up for first time,destinationWeather
div loosing all its data and i can see only this information there
<div class="fancybox-inline-tmp" style="display: none;"></div>
Not sure why this is happening?
IMPORTANT : Please note that fancybox v1.3.4 doesn't work with jQuery v1.9+.