2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

removed twipsy options

This commit is contained in:
Rod Vagg
2011-11-07 12:10:53 +11:00
parent d725ac2feb
commit 1b43c87eaf
4 changed files with 4 additions and 29 deletions
+2 -3
View File
@@ -119,7 +119,7 @@
, setContent: function () {
var $tip = this.tip()
$tip.find(this.options.contentSelector)[this.options.html ? 'html' : 'text'](this.getTitle())
$tip.find('.twipsy-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
$tip[0].className = 'twipsy'
}
@@ -302,7 +302,6 @@
, title: 'title'
, trigger: 'hover'
, template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
, contentSelector: '.twipsy-inner'
}
$.fn.twipsy.rejectAttrOptions = [ 'title' ]
@@ -319,4 +318,4 @@
return $.extend({}, options, data)
}
}( window.jQuery || window.ender );
}( window.jQuery || window.ender );
+1 -1
View File
@@ -78,7 +78,7 @@ $(function () {
var expectedTitle = 'Gotta make you understand'
, popover = $('<a href="#">@rvagg</a>')
.attr('title', expectedTitle)
.data('content', '<p><b>Never gonna give you up</b>,</p><p>Never gonna let you down</p>')
.attr('data-content', '<p><b>Never gonna give you up</b>,</p><p>Never gonna let you down</p>')
.appendTo('#qunit-runoff')
.popover({
html: true
+1 -19
View File
@@ -78,22 +78,4 @@ $(function () {
$('#qunit-runoff').empty()
})
test("should allow arbitrary template html with content selector options", function() {
$.support.transition = false
var twipsy = $('<a href="#" rel="twipsy" title="<b>@fat</b>"></a>')
.appendTo('#qunit-runoff')
.twipsy({
html: true
, contentSelector: 'h1'
, template: '<div><h1>Funky Twipsy!</h1><p class="funky"><b>@rvagg was here</b></p></div>'
})
.twipsy('show')
ok($('.twipsy h1').length, 'h1 tag was inserted')
ok($('.twipsy p>b').length, 'p > b tags were inserted')
ok($('.twipsy h1>b').length, 'h1 tag was customised')
twipsy.twipsy('hide')
ok(!$(".twipsy").length, 'twipsy removed')
$('#qunit-runoff').empty()
})
})
})