How to bind an event to appended element in jQuery?

Triggering jQuery event only after another event has been handled?

  • I am trying to use two jQuery plugins: tinyscroll zRSSfeed I am able to use both of the separately but when trying to use them together ( to create a scrollable RSS feed division), the scroller is getting disabled. I figured this is happening because before RSS feed is pushed to my document, the scroller assumes it is empty and hence disables itself. I tried using the change() event but still it isn't working. So basically, I need an event that will not trigger the scroller jQuery plugin till zRSSfeed plug in has finished pushing the feeds to my documents. Any idea how? Thanks!

  • Answer:

    My work around for this may not be best practice, but it works well. What you do is you create a variable called window.objecthasrun and set it to false. On your trigger, when you call the Jquery object, set it to true, after your object has returned data. Hope that helps.

Lilmaster at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

My work around for this may not be best practice, but it works well. What you do is you create a variable called window.objecthasrun and set it to false. On your trigger, when you call the Jquery object, set it to true, after your object has returned data. Hope that helps.

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.