Jump to content

creating custom event


simpli

Recommended Posts

Hi,

I think I need to create a custom even when the table I'm building is done loading so I can collapse the different tbodys in it. Can anyone has a simple example of an event creation and further usage? I tried finding some in the internet but they look either fishy or complicated.

 

Thanks,

J-R

Link to comment
Share on other sites

There's no way to create a custom event without modifying browser code.  (Well, technically, you could but it would have to rely on other events and involve looping.)

 

 

You could just put JS code right after the table, by the way.  You could also just use a document.onload.

 

 

Or, with a framework like jQuery, you could do onready.

Link to comment
Share on other sites

You can attach events with jQuery?  Hrmmm, I think I knew that at some point, but I forgot it.  I wonder if there is some method I don't know about to attach an event to a DOM object or something, or if jQuery just loops or something.  I would imagine there's a method I don't know about since script execution would hang if not.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.