Reputation: 37
I essentially only understand how to read bits of JavaScript and make modifications.
I am using grid-slider, a script I purchased, but the code writer is mia at the moment, so hopefully someone here can help me.
Basically, it's a slider and there are options to have links open like normal or to have links open in a panel on the same page. I want some links to open in a panel and others to open in the parent window.
It seems to me that all that would be required to do this would be to activate the panel display function (which I've done) and then set up an exclude function to exclude certain ul
s or li
s with a specific class from the function. I've read about the .not selector, but I don't see how to make it applicable to this code:
else {
if (this._displayOverlay) {
if ($item.find(">.content").size() > 0) {
$item.data("type", "static");
}
else {
var contentType = this.getContentType($link);
var url = $link.attr("href");
$item.data({type:contentType, url:(typeof url != "undefined") ? url : ""});
}
$item.css("cursor", "pointer").bind("click", {elem:this, i:i}, this.openOverlay);
}
$link.data("text", $item.find(">div:first").html());
$img = $link.find(">img");
}
Can anyone help based on looking at this? There is a link to the demo of the code in here.
Thank you.
Upvotes: 1
Views: 157
Reputation: 4484
Referring to the jQuery documentation .not() method constructs a new jQuery object from a subset of the matching elements. So you can apply .not() where you want exclude, in this case your class, to an event, for example exclude a class to bind('click'):
$item.css("cursor", "pointer").not('.myexcludedcalss').bind("click", {elem:this, i:i}, this.openOverlay);
(like mentioned in the comment above)
Upvotes: 1