Re: [jQuery] Unable to bind click function in a dynamically created object?

2006-10-18 Thread Pascal
ah, i'm sorry, i found the problem, in another function that is running on document.ready. (it's converting the sidenav into a rounded box by grabbing the html and recreating the div, so the click handlers are getting lost. it's an old function that i'll have to rewrite in a more JQ way.)

Re: [jQuery] Unable to bind click function in a dynamically created object?

2006-10-18 Thread Mike Alsup
> I see one thing that may cause the problem: your variable link is a > jQuery object. This is passed as context a few lines later on, but you > have to pass a DOM node as context to the $ function. The context arg can be a jQuery object. From the source: jQuery = function(a,c) {

Re: [jQuery] Unable to bind click function in a dynamically created object?

2006-10-18 Thread John Resig
Hi Pascal - I did a little bit of re-tooling and got it working: http://john.jquery.com/jquery/test/page.html Let me know if it helps. --John > $('.page').each(function(i) { > var title = $('h3',this).eq(0).text(); > var link = $(''+title+''); > $('.sidenav ul').append(l

Re: [jQuery] Unable to bind click function in a dynamically created object?

2006-10-18 Thread Klaus Hartl
Mike Alsup schrieb: >> I see one thing that may cause the problem: your variable link is a >> jQuery object. This is passed as context a few lines later on, but you >> have to pass a DOM node as context to the $ function. > > > The context arg can be a jQuery object. From the source: > > jQue

Re: [jQuery] Unable to bind click function in a dynamically created object?

2006-10-18 Thread Klaus Hartl
Pascal schrieb: > hey gang-- > > i got a bit of a stumper for ya, trying to bind a function to the > click event of each link in a dynamically generated list. > > i have a bunch of long content pages that we're breaking up into > subpages, with a sidenav to navigate through them. the markup

[jQuery] Unable to bind click function in a dynamically created object?

2006-10-18 Thread Pascal
hey gang-- i got a bit of a stumper for ya, trying to bind a function to the click event of each link in a dynamically generated list. i have a bunch of long content pages that we're breaking up into subpages, with a sidenav to navigate through them. the markup for each page is as follows: