Skip to content

Instantly share code, notes, and snippets.

@oelmekki
Created September 22, 2010 15:53
Show Gist options
  • Save oelmekki/591947 to your computer and use it in GitHub Desktop.
Save oelmekki/591947 to your computer and use it in GitHub Desktop.
$.Dagobert.Controllers.AtelierSlider.prototype.clicked = function( event ){
var $target = $( event.target );
if ( $target.parents( 'a' ).length ){
$target = $target.parents( 'a' ).first();
}
if ( $target.is( 'a' ) && $target.parents( '.ce_atelierImg' ).length ){
event.stopPropagation();
event.preventDefault();
if ( ! ( $target.parents( '.firstVisible' ).length || $target.parents( '.lastVisible' ).length ) ){
var lightbox = $.Dagobert.getController( 'Lightbox', $target.attr( 'href' ), { element: $target, width: 852, height: 575, slide: $target.hasClass( 'slide' ), cache: false });
lightbox.open();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment