0

Possible Duplicate:
jQuery cluetip('destroy') does not destroy/remove cluetip?

In my code, there is a cluetip that binds itself to an anchor. I need to know what sort of properties can I assert when unit testing it?

At the moment, all I could do is to assert the id of the cluetip, which seems insufficient. I want to find out whether there is some sort of class in cluetip that changes when it is binded to a particular html element.

Community
  • 1
  • 1
BeraCim
  • 2,317
  • 8
  • 49
  • 78
  • Please refer to [this](http://stackoverflow.com/questions/1950197/jquery-cluetipdestroy-does-not-destroy-remove-cluetip) thread for answer. Thanks. – BeraCim Jan 05 '10 at 01:11

1 Answers1

1

I've read the ClueTip code and it uses the $(...).bind() function to bind the desired method desired of showing the tip with the desired element.

I believe that any method of inspecting the bindings of an element will have the desired effect.

It uses the following bindings:

click.cluetip
focus.cluetip
blur.cluetip
mousemove.cluetip
mouseenter.cluetip
mouseleave.cluetip

depending of course the desired method.

Paulo Santos
  • 11,285
  • 4
  • 39
  • 65
  • @Paulo Santos: I believe the way cluetip works is that there is only ever 1 instance of cluetip. Whenever a html element needed to display a cluetip, it binds itself to it. So based on that thinking, when a cluetip is needed there has to be a change of certain variable in cluetip which tells it that okay now I'm displaying info for anchor A. I want to know whether such variable exists, and if so what is it and how to get to it. Being not from javascript background makes reading that file a nightmare. And no I can only use jQuery or Javascript, cant use other 3rd party software. Thanks. – BeraCim Dec 16 '09 at 04:01