Skip to content

Instantly share code, notes, and snippets.

@lnickers2004
Last active January 3, 2016 07:39
Show Gist options
  • Save lnickers2004/8430717 to your computer and use it in GitHub Desktop.
Save lnickers2004/8430717 to your computer and use it in GitHub Desktop.
Bootstrap3: Tooltip support. NOTE: this requires the use of javascript -- calling the tooltip(); method
<script>
(function(){
$("#contactForm input[type=submit]").tooltip();
//alternative is to set delay in code with more options:
$("#contactForm input[type=submit]").tooltip(
{
delay:{
show: 500,
hide: 0
}
});
})();
</script>
//NOTE IF USEING the 2nd approach, remove the declarative data-delay from the markup
<!--submit button-->
<input type="submit" value="Submit" class="btn btn-success btn-md"
data-toggle="tooltip" title="Press Here" data-placement="left" data-delay="500"/>
//HTML IMAGE IN TOOTIP EXAMPLE
<input type="submit" value="Submit" class="btn btn-success btn-md"
data-toggle="tooltip" title="<img src='images/cloud-party-images/A5KznqdHE.jpg' alt='' class='img-responsive'/>" data-placement="left" data-html="true"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment