allow apply selector more than once, fix

This commit is contained in:
vitalets
2013-08-06 00:25:17 +04:00
parent 62da4f7cd3
commit db5b8fd070
3 changed files with 18 additions and 3 deletions

@ -647,13 +647,19 @@
test("`selector` option", function () {
var parent = $('<div><a href="#" id="a" data-type="text">123</a></div>').appendTo('#qunit-fixture').editable({
selector: 'a',
url: 'post.php',
source: groups
selector: '#a',
url: 'post.php'
}),
b = $('<a href="#" id="b" data-type="select" data-value="1"></a>'),
e = $('#a'),
selected = 2;
//apply delegated editable second time
parent.editable({
selector: '#b',
url: 'post.php',
source: groups
});
ok(!e.hasClass('editable'), 'no editable class applied');