[jQuery] Ajax onclick optimization

2008-10-09 Thread hykoh
Hello, i want to optimize my code. Example: $(document).ready(function() { $('.message_subject').click(function() { var msgBox = $(this).parent().parent().parent(); var msgID = msgBox.attr('id'); msgBox.find('.message_text').slideToggle('

[jQuery] Ajax Code Optimization (delay)

2008-10-09 Thread hykoh
Hello, i want to optimize my code. Example: $(document).ready(function() { $('.message_subject').click(function() { var msgBox = $(this).parent().parent().parent(); var msgID = msgBox.attr('id'); msgBox.find('.message_text').slideToggle('