[jQuery] Re: click function doesn't work on dynamic content?
Might be worth looking into the livequery plugin too J On Jun 6, 1:43 am, Richard D. Worth [EMAIL PROTECTED] wrote: Take a look at: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st... If I've understood you're problem, it's a fairly common one that stems from the fact that you're adding a new element (with append('li ...) that has no click event bound to it. The article linked above has a full explanation and some good solutions. - Richard Richard D. Worthhttp://rdworth.org/ On Thu, Jun 5, 2008 at 7:31 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi there, Please see my example here:http://www.hellobenlau.net/jquery/test.htm So basically, I want to select a list item from Group A, and when the transfer button is clicked, it gets transfered to Group B. However, once transferred, the list items in Group B doesn't respond to any click function called OUTSIDE of the 'transfer' function. Im not sure if i'm explaining it properly, but this is my code: $(document).ready(function(){ var temp; // selecting $('li').click(function(){ $('li.highlight').removeClass('highlight'); $(this).addClass('highlight'); temp = $(this).text(); }); // when transfer link is clicked $('#transfer').click(function(){ $('#groupA li.highlight').remove(); $('#groupB').append('li' + temp + '/li'); }); }); Any help would be extremely helpful! Thanks!!
[jQuery] Re: when to call noConflict?
Call it before, there's some documentation here: http://docs.jquery.com/Using_jQuery_with_Other_Libraries J On May 20, 11:38 pm, darren [EMAIL PROTECTED] wrote: hi everybody I have some code where i need to use jQuery.noConflict() Do i call it before or after jQuery(document).ready() ?
[jQuery] .html() behaving differently in IE7
Hi, I'm trying to find out if this behaviour is correct, or if its something that i should submit as a bug. Using .html() works perfectly fine in all browsers, providing that the html your inserting is valid. eg. $(body).find('#id1').html(divtest content/div).show(); // alert($('#id1').html()) == 'divtest content/div' However, if i want to insert html which is invalid (just withing the string), but still might keep the total DOM valid by performing another insert immediately, then in IE7 only, it refuses to insert the html. eg. $(body).find('#id1').html(divtest content/div/div).show(); // alert($('#id1').html()) == '' Is this something that jQuery is deliberately doing, or is this a bug? Because, like i say, it works fine in Firefox. J
[jQuery] Re: attr difference in Firefox and IE7
I would upgrade to the latest version of jQuery, there's a few attribute bugfixes that could help J On May 20, 6:01 am, Sid [EMAIL PROTECTED] wrote: Hi, I'm using the .attr() to set attributes of an img tag. This works in Firefox 2.0.0.14 but not in Internet Explorer 7. The offending piece of code is $('#preview').livequery(function() { $('#preview').attr('src',previewImage); $('#preview').attr('width','302px'); $('#preview').attr('height','188px'); return false; }); Works in FF but in IE, only the src is changed. The width and height remain unaffected. To see, checkhttp://sid-deswal.110mb.comand click on 'Themes' And I can't understand the IE error message which says Line: 5 Char: 1 Error: Object Expected Code: 0 Regards
[jQuery] Re: attr('form') not work in firefox
It looks like you're just trying to get the action on the form? $('#a').attr('action'); On May 19, 2:53 am, Matt Quackenbush [EMAIL PROTECTED] wrote: Unless I'm completely misunderstanding something here, that code should not work in any browser. There is no form attribute on an input / element. What are you actually trying to accomplish? On Sun, May 18, 2008 at 8:22 PM, wrote: This is my html: form id=myForm action= input type=text id=a / /form and javascript: script type=text/javascript $(document).ready(function() { var form = $('#a').attr('form'); alert(form.attr('action')); }); /script it works in IE 7.0, but in FF form is 'undefined', I can get the form using var form = $('#a').get(0).form; so why attr('form') does not work in firefox?
[jQuery] Re: JQuery and ASP.NET AJAX
I dont see any conflicts here - one is client side, the other server side - will be fine :-) On May 18, 8:30 pm, Mike [EMAIL PROTECTED] wrote: Do these work well together or cause conflicts?