mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
removed twipsy options
This commit is contained in:
parent
d725ac2feb
commit
1b43c87eaf
@ -559,12 +559,6 @@ $('#.tabs').bind('change', function (e) {
|
||||
<td>[default markup]</td>
|
||||
<td>the html template used for rendering a twipsy</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>contentSelector</td>
|
||||
<td>string</td>
|
||||
<td>.twipsy-inner</td>
|
||||
<td>selector used to find the title element within the tooltip</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><span class="label notice">Notice</span> Individual twipsy instance options can alternatively be specified through the use of data attributes.</code></p>
|
||||
|
3
js/bootstrap-twipsy.js
vendored
3
js/bootstrap-twipsy.js
vendored
@ -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' ]
|
||||
|
2
js/tests/unit/bootstrap-popover.js
vendored
2
js/tests/unit/bootstrap-popover.js
vendored
@ -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
|
||||
|
18
js/tests/unit/bootstrap-twipsy.js
vendored
18
js/tests/unit/bootstrap-twipsy.js
vendored
@ -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()
|
||||
})
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user