I am doing a bit of refactoring on some logic and i came across this chunk of code and i am still trying to understand it
try {
$('a[@rel*=lightbox]').lightBox();
} catch (e) {}
I understand the try catch part but what is this part
('a[@rel*=lightbox]')
It is the old XPath way of saying find anchors with
lightboxin theirrelattribute. So it would match an anchor like the example below…It has been deprecated and removed from new versions of jQuery. To get it to work with the latest versions, just drop the
@: