Attempting to implement fancybox2 which will open a hidden div(maybe where the user clicks or predefined location).
The div
<div class="catSelections" style="display:none"><ol class="selectable ui-selectable"><div class="ui-selectee"><p class="ui-selectee">Dwelling Pictures</p><p class="ui-selectee"></p><li parentid="1" id="3" class="ui-widget-content ui-selectee">Front of Risk</li><li parentid="1" id="8" class="ui-widget-content ui-selectee">Right side of risk</li><li parentid="1" id="9" class="ui-widget-content ui-selectee">Left side of risk</li></div></ol></div>
The method I am invoking on a specific action(when user clicks on a photo div)
function addFancy(div){
$(".catSelections").fancybox({
maxWidth : 800,
maxHeight : 600,
fitToView : false,
width : '70%',
height : '70%',
autoSize : false,
closeClick : false,
openEffect : 'none',
closeEffect : 'none'
});
}
Am I approaching this in the wrong way?
Error message
Uncaught TypeError: Object [object Object] has no method 'fancybox'
js loaded at bottom of page
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="http://fancyapps.com/fancybox/source/jquery.fancybox.pack.js?v=2.0.5"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
..
..
..