jQuery custom lighbox

Out of context: Reply #22

  • Started
  • Last post
  • 30 Responses
  • acescence0

    yeah, i guess it's a little weird the way it's organized. you've got a lot of anonymous functions doing all of the work in different places, where it could be centralized a bit. i would make a display function that controls everything, and then pass the necessary data to that from each of your links...
    showImage( link.attr( 'href' ), link.attr( 'title' ), position, etc );
    or you could pass that stuff to the open function on lines 52/59, and amend that to set caption, etc..

View thread