0
votes

I am setting a tooltip on a div as follows; (I'm not sure why I'm doing it this way frankly but I saw a snippet that used this and it works the way I like it)

 <div id="termsandconditions" class="col-xs-6" data-toggle="tooltip" title="Agree to the terms to enable the form">
        <a href="#modal-terms" data-toggle="modal" class="register-terms">Terms</a>
        <label class="switch switch-primary" >
            <input type="checkbox" id="register-terms" name="register-terms">
            <span></span>
        </label>
 </div>

Update This produces a styled modal tooltip popup, I want to change the text within it on click event. I suspect my inability to change the text has to do with the data-toggle attribute. Using the prop or attr changes the tooltip, but not the title text in the modal tooltip popup that's set from data-toggle.

The following actually ADD a tooltip , but dont change the text in the original tooltip pop up

  $("#termsandconditions").dialog("option", "title", "De-selecting terms will disable the form");
  $('#termsandconditions').prop('title', 'De-selecting terms will disable the form');
2
yes, it works in your fiddle, and it should, but its not working on my page. Something must be overriding it - dinotom
Are you using any plugins that render your tooltips? - khriskooper
@dinotom, Problem must be somewhere else. You need to provide more innformation. As of now problem is not-repro - Satpal

2 Answers

0
votes
$('#termsandconditions').attr('title', 'De-selecting terms will disable the form');
0
votes
$('#termsandconditions').attr('data-original-title', 'De-selecting terms will disable the form');