I have a small problem with the Jquery ui selectable function.

$("#test").selectable({
    filter:'label',
    stop: function() {        
        $(".ui-selected input", this).each(function() {
            this.checked= !this.checked
        });
    }
});

http://jsfiddle.net/APfcf/

The HTML links within the DIV tag "test" do not respond when clicked. While the HTML link outside of the DIV tag behaves normally.

I'm trying to get those links within the DIV tag working again. They seem to respond if you right click and open in new tab or window, but left clicking doesn't do anything.

Any help is appreciated.

Thanks

有帮助吗?

解决方案

Use cancel to make sure the selectable doesn't apply to your anchor tags:

$("#test").selectable({
    filter:'label',
    cancel: 'a',
    stop: function() {        
        $(".ui-selected input", this).each(function() {
            this.checked= !this.checked
        });
    }
});
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top