Bootstrap Popover, javascript and img

Hi,
I am trying to create a smiley box, I tried using a popover to show all the smilies instead of having them right on page.

This is the tag I am currently using to show smilies :
[php][/php]

insertsmiley is the js I am using to insert the smiley to the textbox.

Now I need this to be within a popover, I tried using this :

[php]<span class=“btn btn-inverse btn-sm popover-notitle” data-rel=“popover” data-placement=“bottom” data-content="">Smilies[/php]

And this is the JS to show the popover, I have added the html attribute in here.

$('[data-rel=popover]').popover({html:true});

But this doesn’t work, specifically the insertsmiley function isn’t working… It load the popover just as required but the function isn’t working.

I need help getting this to work correctly, I hope my question is conveyed correctly.

Thanks !

Do you mean that you have a pop-up that appears when someone press the smiley button.
Then, they select one of the smiley’s in the pop up and you use the data from it to add the
smiley to the whatever-you-are-doing?

If so, here is a sample of how to do it. This is a working JSfiddle example that I did NOT write.
But, it appears to work nicely. I am sure you can alter it to work for you. It uses simple JQuery,
so it should be easy to alter.

http://jsfiddle.net/6hkkk/7/

Hope this helps!

Sponsor our Newsletter | Privacy Policy | Terms of Service