i am using Jquery selectable to select student names and these names are hyperlink. it seems that even when i click on them it makes these it开发者_JAVA技巧ems seleactable, however what i want is if they click on hyperlink it should postback otherwise if user draw a lesso it should select. any help?
There's a cancel option for this, that defaults to :input, option
. jQuery UI does a return false
for the click check you click on a selectable element (invoking it's own behavior) unless the target matches the cancel
selector filter.
So to get this working, just add a
to the cancel
option selector, for example:
$(".selector").selectable({ cancel: "a,:input,option" });
...if you're sure there are not inputs or <option>
elements, it can just be "a"
.
精彩评论