jquery - using Fancybox with 2 ids the same -


i have 2 fancybox iframes same , both on same page - in different places (yes, both necessary). @ present, referenced jquery code:

$(function() {     $("#index").fancybox({         'width'             : 615,         'height'            : 450,         'autoscale'         : true,         'autodimensions'    : true,         'transitionin'      : 'elastic',         'transitionout'     : 'fade',         'overlaycolor'      : '#111',         'type'              : 'iframe'     }); }); // index2    $(function() {     $("#index2").fancybox({         'width'             : 615,         'height'            : 450,         'autoscale'         : true,         'autodimensions'    : true,         'transitionin'      : 'elastic',         'transitionout'     : 'fade',         'overlaycolor'      : '#111',         'type'              : 'iframe'     }); }); 

i have called them #index , #index2. syntax combine these same function? possible? mean this:

$(function() { $("#index" && "#index2").fancybox({ 

not familiar fancybox, if can use class selectors instead of ids, give both elements same class, "fancy", , access them via

$('.fancy').fancybox({...


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -