Skip to content

Commit 1b43c87

Browse files
committed
removed twipsy options
1 parent d725ac2 commit 1b43c87

File tree

4 files changed

+4
-29
lines changed

4 files changed

+4
-29
lines changed

docs/javascript.html

-6
Original file line numberDiff line numberDiff line change
@@ -559,12 +559,6 @@ <h3>Options</h3>
559559
<td>[default markup]</td>
560560
<td>the html template used for rendering a twipsy</td>
561561
</tr>
562-
<tr>
563-
<td>contentSelector</td>
564-
<td>string</td>
565-
<td>.twipsy-inner</td>
566-
<td>selector used to find the title element within the tooltip</td>
567-
</tr>
568562
</tbody>
569563
</table>
570564
<p><span class="label notice">Notice</span> Individual twipsy instance options can alternatively be specified through the use of data attributes.</code></p>

js/bootstrap-twipsy.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119

120120
, setContent: function () {
121121
var $tip = this.tip()
122-
$tip.find(this.options.contentSelector)[this.options.html ? 'html' : 'text'](this.getTitle())
122+
$tip.find('.twipsy-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
123123
$tip[0].className = 'twipsy'
124124
}
125125

@@ -302,7 +302,6 @@
302302
, title: 'title'
303303
, trigger: 'hover'
304304
, template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
305-
, contentSelector: '.twipsy-inner'
306305
}
307306

308307
$.fn.twipsy.rejectAttrOptions = [ 'title' ]
@@ -319,4 +318,4 @@
319318
return $.extend({}, options, data)
320319
}
321320

322-
}( window.jQuery || window.ender );
321+
}( window.jQuery || window.ender );

js/tests/unit/bootstrap-popover.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ $(function () {
7878
var expectedTitle = 'Gotta make you understand'
7979
, popover = $('<a href="#">@rvagg</a>')
8080
.attr('title', expectedTitle)
81-
.data('content', '<p><b>Never gonna give you up</b>,</p><p>Never gonna let you down</p>')
81+
.attr('data-content', '<p><b>Never gonna give you up</b>,</p><p>Never gonna let you down</p>')
8282
.appendTo('#qunit-runoff')
8383
.popover({
8484
html: true

js/tests/unit/bootstrap-twipsy.js

+1-19
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,4 @@ $(function () {
7878
$('#qunit-runoff').empty()
7979
})
8080

81-
test("should allow arbitrary template html with content selector options", function() {
82-
$.support.transition = false
83-
var twipsy = $('<a href="#" rel="twipsy" title="<b>@fat</b>"></a>')
84-
.appendTo('#qunit-runoff')
85-
.twipsy({
86-
html: true
87-
, contentSelector: 'h1'
88-
, template: '<div><h1>Funky Twipsy!</h1><p class="funky"><b>@rvagg was here</b></p></div>'
89-
})
90-
.twipsy('show')
91-
92-
ok($('.twipsy h1').length, 'h1 tag was inserted')
93-
ok($('.twipsy p>b').length, 'p > b tags were inserted')
94-
ok($('.twipsy h1>b').length, 'h1 tag was customised')
95-
twipsy.twipsy('hide')
96-
ok(!$(".twipsy").length, 'twipsy removed')
97-
$('#qunit-runoff').empty()
98-
})
99-
})
81+
})

0 commit comments

Comments
 (0)