Commit e10c622585fc65c84ffcb031e7abdcf1d8ed79e8
1 parent
61f4b0eb
Exists in
master
and in
79 other branches
fixing bug with popover
Showing
1 changed file
with
9 additions
and
7 deletions
Show diff stats
theme.js
@@ -254,19 +254,21 @@ $('#link-buscar').click(function(e) { | @@ -254,19 +254,21 @@ $('#link-buscar').click(function(e) { | ||
254 | var span = $('span[data-toggle="popover"]'); | 254 | var span = $('span[data-toggle="popover"]'); |
255 | var place = span.attr("data-placement"); | 255 | var place = span.attr("data-placement"); |
256 | var elementClass = span.attr("data-class"); | 256 | var elementClass = span.attr("data-class"); |
257 | - span.popover({ | 257 | + var popover = span.popover({ |
258 | html:true, | 258 | html:true, |
259 | placement: place, | 259 | placement: place, |
260 | content: function() { | 260 | content: function() { |
261 | return $(this).next().html(); | 261 | return $(this).next().html(); |
262 | } | 262 | } |
263 | }) | 263 | }) |
264 | - .data('bs.popover') | ||
265 | - .tip() | ||
266 | - .addClass(elementClass); | ||
267 | - $('a.toggle-popover').on("click",function() { | ||
268 | - span.trigger("click"); | ||
269 | - }); | 264 | + .data('bs.popover'); |
265 | + if(popover) { | ||
266 | + popover.tip() | ||
267 | + .addClass(elementClass); | ||
268 | + $('a.toggle-popover').on("click",function() { | ||
269 | + span.trigger("click"); | ||
270 | + }); | ||
271 | + } | ||
270 | } | 272 | } |
271 | 273 | ||
272 | $(document).ready(function(){ | 274 | $(document).ready(function(){ |