Colorbox does not work after upgrading from version 1.3.19 to version 1.4.6

I updated the Colorbox.min.js file from version 1.3.19 to version 1.4.6, and some of my columns do not work. I am not getting any errors on the page and the Chrome console.

I checked changelog , but I did not find anser. Could you help me?

(I am using jQuery 1.7.2)

  • This does not work:
<a href="#" onclick="emailDialog()">e-mail</a>
function emailDialog(){  
    $.fn.colorbox({  
        width:"700px", height:"550px",  
        iframe:true, href:"/contact",  
        opacity:0.6  
    });  
}
  • This works well:
<a href="http://example.com/1.jpeg" class="colorbox-avatar" title="some title" rel="nofollow" >photo</a>
$(document).ready(function() {  
    $(".colorbox-avatar").colorbox({  
        rel:'colorbox-avatar',  
        scrolling: false,  
        current: "",  
        slideshow:true, slideshowAuto:false,  
        opacity:0.6,  
        width:"60%" , height:"60%"  
    });  
}  
+5
source share
1 answer

call him without .fn... so$.colorbox({...})

( $.fnused to develop jQuery plugins and really just a shorthand notation$.prototype ).

function emailDialog(){
    $.colorbox({
        width:"700px", height:"550px",
        iframe:true, href:"/contact",
        opacity:0.6
    });   
}

jsfiddle demo

+1
source

All Articles