John Smith
John Smith

Reputation: 2813

Popover on input field

I've tried looking at previous solutions but none of them have worked.

I'm trying to have a popover show up to the left after clicking on the input field.

HTML:

<input id="name" type="text" placeholder="Type your full name" rel="popover">

JS:

<script type="text/javascript">
  $('#name').popover({'title': 'Name tooltip'});
</script>

Upvotes: 1

Views: 4538

Answers (4)

Carol Skelly
Carol Skelly

Reputation: 362430

If you use placement:left when you init the popover it should work. Is your popover not working at all, or just not on the left?

And, don't forget the document.ready..

$(document).ready(function() {
   $('#name').popover({title:'Name tooltip',placement:'left'});
});

Upvotes: 2

John Smith
John Smith

Reputation: 2813

Dumb mistake by me. I wasn't loading the JavaScript files from the right directory.

Upvotes: 0

Yogus
Yogus

Reputation: 2272

try this

<script type="text/javascript">
  $("#name").popover({title: "Name tooltip"});
</script>

Upvotes: 0

daniel
daniel

Reputation: 1433

qTip is nice! Version 2 is out: http://craigsworks.com/projects/qtip2/

Upvotes: 0

Related Questions