0

I have a table of div's and every time i click one I'd like to get a pop up. They will all be in a different place. So I thought that the best way of doing this would be jQuery.

I found a balloon pop up tutorial for jQuery... and I got a pop up. but I'm struggling on a lot of things.

how do i initiate a jQuery function from an onclick event and pass in an ID parameter as a selector?

This is the code that I am using just to try get it working:

$(function() {
  $('div').showBalloon( {
    contents: "hello"
  }).toggle(
    function() {$(this).hideBalloon(); },
    function() {$(this).showBalloon(); }
  );
});

where showBalloon is from a jQuery plugin. so instead of $('div') i'd like to use a function parameter.. Does this make sense?

Zach Smith
  • 8,458
  • 13
  • 59
  • 133

0 Answers0