Fancybox
Monday, March 01 2010 @ 12:25 AM CST
Fancybox for JQuery is useful for those little pop-up image galleries, but it only works on images within links that are grouped by having the same "rel" tag. If you want to use another tag, apply this patch (to 1.3.0).
61c61,62
< var rel = $(this).attr('rel') || '';
---
> var $attributetype = options.attributeType;
> var rel = $(this).attr($attributetype) || '';
67c68
< selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
---
> selectedArray = $("a[" + $attributetype +"=" + rel + "], area[" + $attributetype + "=" + rel + "]");
999a1001,1002
> attributeType : 'rel',
>
You can then use the new "attributeType" to pass the tag type when calling the script.



