Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1145
jquery .bind not working with events???
posted

I have a grid and I wanted to use .bind and .unbind to handle events, but I can't seem to get bind to work.

If I do:

        grid.igGrid({
            dataRendered: function () {
                handleRendered();
            }
        });

handleRendered will get called.

If I do:

        grid.bind("dataRendered", function () {
                handleRendered();
            }
        });


handleRendered will not be called.

Now, obviously I want to bind and unbind the same function, but I did this to demonstrate the failure. Am I doing something wrong? In both cases, grid is the same $(selector)...

Am I missing something?