[jQuery] JQuery events and a possible scoping error on my part?

2009-07-03 Thread bsenftner
Just learning Java Script & JQuery, but an experienced developer, I've created a page with a series of elements that use the .slideDown() and .slideUp() functions to reveal and hide the different areas of content on the page. To facilitate this, the page's html uses links with ids similar to: {

[jQuery] JQuery Events

2009-02-24 Thread shapper
Hello, I have the following: $('#Professor').click(function(){ if ( this.checked ) { $('#ProfessorField').show(); $('#SubscriptionsField').show(); } else { $('#ProfessorField').hide(); $('#SubscriptionsField').hide(); } }) Basically on a

[jQuery] JQuery events + ajax question

2008-12-08 Thread gotnoboss
Hi, I've got a question I was hoping someone could shed some light on for me. Suppose you have a div like so: One Two Three 1) Suppose you have bound a 'click' event to every checkbox in the above: $("#container input).click(function() {alert('hi');}); 2) Then, you ca

[jQuery] jQuery events don't work after AJAX load

2008-07-07 Thread [EMAIL PROTECTED]
Hi folks, I have a page with a photo on it. I load the comments for this photo via an ajax request: var item_id_val = $("#item_id").val(); $.post("/show_comments", item_id: item_id_val }, function(data) { /* Update the comment_section div. */ $("#comment_section").html(data); }); That

[jQuery] jQuery events on plain old JavaScript objects

2008-04-02 Thread Thom
This works: var monkey = { name: 'Dave' } $(monkey).bind('climb', function(monkey) { alert(this.name + ' is climbing!'); }); $(monkey).trigger('climb'); I really just wanted to check that this was expected functionality - and isn't going to disappear anytime soon - as I'd like to lean on it quit