You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While looking into seeing if I could implement a custom dot navigation in colorbox (in addition to using the previous/next navigation), I realized that two very simple methods could help implement this and potentially allow user to do other kinds of customization of their own.
I was thinking something along the following lines would be helpful to add to the 1.x plugin
/**
* To get all elements in a particular grouping
* user can use $.data(element, 'colorbox') to
* get the rel group of a particular element.
* @param { String } rel the current grouping string/label
*/
publicMethod.getRelated = function(rel) {
return getRelated(rel);
};
/**
* Tell colorbox to go to a particular slide index
* could be used in conjunction with publicMethod.getRelated()
* to get related length
* @param { int } index
*/
publicMethod.gotoSlide = function(index) {
if($related && $related[index])
launch($related[index]);
};
@jackmoore Let me know how if there are better/other ways to do this. Or if this would be useful functionality to add to the 1.x branch of the plugin. An if so, let me know how I could go about doing a pull request.
The text was updated successfully, but these errors were encountered:
While looking into seeing if I could implement a custom dot navigation in colorbox (in addition to using the previous/next navigation), I realized that two very simple methods could help implement this and potentially allow user to do other kinds of customization of their own.
I was thinking something along the following lines would be helpful to add to the 1.x plugin
@jackmoore Let me know how if there are better/other ways to do this. Or if this would be useful functionality to add to the 1.x branch of the plugin. An if so, let me know how I could go about doing a pull request.
The text was updated successfully, but these errors were encountered: