Note that there are some explanatory texts on larger screens.

plurals
  1. POchanging the title of a popover with bootstrap and jquery
    text
    copied!<p>here's the html for the link, i.e.:</p> <pre><code> &lt;a href="javascript:void(0);" style="font-size: 3em; color: #222" class="popover-test" id="directNavPrev" data-title="Previous Result Row" data-content="Previous Result Row"&gt; &amp;laquo;&lt;/a&gt; </code></pre> <p>yes, i'm calling .popover() to initialize and the popover works just fine. i can get the content to update with no problem. just not the title. i've tried "prev.data('title','new title')" and even tried to re-init "prev.popover({title:'new title'});" with no dice... thanks.</p> <pre><code> function SetDirectNavigationPlaceholder() { //debugger; var item = $("#movementType :selected").val(); var direct = $('#directNavigation'); var prev = $('#directNavPrev'); var next = $('#directNavNext'); switch (item) { case "result": $('#bookTypeSection').addClass('hide'); direct.val('Result Row from 1 - 150'); prev.attr('data-title', "Previous Result Row"); next.attr('data-title', "Next Result Row"); prev.attr('data-content', "Check it! this will contain the information for the previous result&lt;table&gt;&lt;tr&gt;&lt;td&gt;blah&lt;/td&gt;&lt;td&gt;blah&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;blah&lt;/td&gt;&lt;td&gt;blah&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;blah&lt;/td&gt;&lt;td&gt;blah&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;blah&lt;/td&gt;&lt;td&gt;blah&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"); next.attr('data-content', "Check it! this will contain the information for the next result&lt;table&gt;&lt;tr&gt;&lt;td&gt;blah&lt;/td&gt;&lt;td&gt;blah&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"); break; case "instrument": $('#bookTypeSection').addClass('hide'); direct.val('Instrument #'); prev.attr('data-title', "Previous Instrument #"); next.attr('data-title', "Next Instrument #"); prev.attr('data-content', "Check it! this will contain the information for the previous &lt;b&gt;instrument&lt;/b&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;blah&lt;/td&gt;&lt;td&gt;blah&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"); next.attr('data-content', "Check it! this will contain the information for the next &lt;b&gt;instrument&lt;/b&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;blah&lt;/td&gt;&lt;td&gt;blah&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"); break; case "bookpage": $('#bookTypeSection').removeClass('hide'); direct.val('Book/Page'); prev.attr('data-title', "Previous Book/Page"); next.attr('data-title', "Next Book/Page"); prev.attr('data-content', "Check it! this will contain the information for the previous &lt;b&gt;book/page&lt;/b&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;blah&lt;/td&gt;&lt;td&gt;blah&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"); next.attr('data-content', "Check it! this will contain the information for the next &lt;b&gt;book/page&lt;/b&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;blah&lt;/td&gt;&lt;td&gt;blah&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"); break; } direct.css('color', '#aaa').not('#directNavigationHeader'); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload