How to assert that a jQuery cluetip has been binded to something?

431 Views Asked by At

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.

1

There are 1 best solutions below

1
On

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.