[jQuery] Multiple Jquery on one page
Hi Everyone, Many time i am getting one problem with Jquery when i am using more then one jquery plugin on same page then only one plugin works which will be on top. I guess few variables mixing and disturbing to each other. I just want to know is there any way to control it? Advance thanks for help.
[jQuery] Re: Multiple Jquery on one page
Thanks for reply me, I am placing following code on page HEAD. script language=javascript src=Jquery.js/script script language=javascript function makeSublist(parent,child,isSubselectOptional,childVal) { $(body).append(select style='display:none' id='+parent+child+'/select); $('#'+parent+child).html($(#+child+ option)); var parentValue = $('#'+parent).attr('value'); $('#'+child).html($(#+parent+child+ .sub_+parentValue).clone()); childVal = (typeof childVal == undefined)? : childVal ; $(#+child+' opti...@value='+ childVal +']').attr('selected','selected'); $('#'+parent).change( function() { var parentValue = $('#'+parent).attr('value'); $('#'+child).html($(#+parent+child+ .sub_+parentValue).clone()); //if(isSubselectOptional) $('#'+child).prepend(option value='none' -- Select -- /option); $('#'+child).trigger(change); $('#'+child).focus(); } ); } $(document).ready(function() { makeSublist('child','grandsun', true, ''); makeSublist('parent','child', false, '1'); }); /script same way i am add another pluging of Date picker and after adding calender script, above stopped work. Here is calender script if you want to see link type=text/css href=js/ui.all.css rel=stylesheet / script type=text/javascript src=js/jquery-1.3.2.js/script script type=text/javascript src=js/ui.datepicker.js/script link type=text/css href=js/demos.css rel=stylesheet / script type=text/javascript $(function() { $(#theDate).datepicker({altField: '#theDate', altFormat: 'dd-mm-yy'}); }); $(function() { $(#theDate1).datepicker({altField: '#theDate1', altFormat: 'dd-mm-yy'}); }); /script Let me know what i am doing wrong. Thanks On Tue, Jul 14, 2009 at 5:28 PM, Mean Mike mcgra...@gmail.com wrote: what plugs are you referring to ? could you show us how your importing jquery and plugins Mean Mike On Jul 14, 7:46 am, Sarm sarm.desig...@gmail.com wrote: Hi Everyone, Many time i am getting one problem with Jquery when i am using more then one jquery plugin on same page then only one plugin works which will be on top. I guess few variables mixing and disturbing to each other. I just want to know is there any way to control it? Advance thanks for help.
[jQuery] Re: Multiple Jquery on one page
If i will remove this following link type=text/css href=js/ui.all.css rel=stylesheet / script type=text/javascript src=js/jquery-1.3.2.js/script script type=text/javascript src=js/ui.datepicker.js/script link type=text/css href=js/demos.css rel=stylesheet / script type=text/javascript $(function() { $(#theDate).datepicker({altField: '#theDate', altFormat: 'dd-mm-yy'}); }); $(function() { $(#theDate1).datepicker({altField: '#theDate1', altFormat: 'dd-mm-yy'}); }); /script then above one will work but if both will be on same page then only calender working. Thanks On Tue, Jul 14, 2009 at 6:58 PM, Mean Mike mcgra...@gmail.com wrote: I'm confused are you saying this doesn't work ? script language=javascript src=Jquery.js/script script language=javascript function makeSublist(parent,child,isSubselectOptional,childVal) { $(body).append(select style='display:none' id='+parent+child+'/select); $('#'+parent+child).html($(#+child+ option)); var parentValue = $('#'+parent).attr('value'); $('#'+child).html($(#+parent+child + .sub_+parentValue).clone()); childVal = (typeof childVal == undefined)? : childVal ; $(#+child+' opti...@value='+ childVal +']').attr('selected','selected'); $('#'+parent).change( function() { var parentValue = $('#'+parent).attr('value'); $('#'+child).html($(#+parent+child+ .sub_+parentValue).clone()); //if(isSubselectOptional) $('#'+child).prepend(option value='none' -- Select -- /option); $('#'+child).trigger(change); $('#'+child).focus(); } ); } $(document).ready(function() { makeSublist('child','grandsun', true, ''); makeSublist('parent','child', false, '1'); }); /script if so are you getting any errors and are you sure your calling the right copy of jquery as I see it is different than whats in the second half of your post
[jQuery] Re: Multiple Jquery on one page
Thanks for reply but both jquery files are related plugin. If i will delete one jquery file then related will stop work. I know one jquery file is enough so if i will remove this one script language=javascript src=Jquery.js/script then Sublist part will be stop work and if i will remove this one script type=text/javascript src=js/jquery-1.3.2.js/script then calender will stop work. On Tue, Jul 14, 2009 at 7:49 PM, Liam Potter radioactiv...@gmail.comwrote: You are including the jquery library multiple times, you only need to call jquery once. eg script type=text/javascript src=jquery.js/script script type=text/javascript src=jquery.plugin.js/script script type=text/javascript src=jquery.plugin.js/script script type=text/javascript src=jquery.plugin.js/script script type=text/javascript src=jquery.plugin.js/script script type=text/javascript $(function(){ $(#selector).plugin(); $(#selector).plguin(); }); /script Mean Mike wrote: I'm confused are you saying this doesn't work ? script language=javascript src=Jquery.js/script script language=javascript function makeSublist(parent,child,isSubselectOptional,childVal) { $(body).append(select style='display:none' id='+parent+child+'/select); $('#'+parent+child).html($(#+child+ option)); var parentValue = $('#'+parent).attr('value'); $('#'+child).html($(#+parent+child + .sub_+parentValue).clone()); childVal = (typeof childVal == undefined)? : childVal ; $(#+child+' opti...@value='+ childVal +']').attr('selected','selected'); $('#'+parent).change( function() { var parentValue = $('#'+parent).attr('value'); $('#'+child).html($(#+parent+child+ .sub_+parentValue).clone()); //if(isSubselectOptional) $('#'+child).prepend(option value='none' -- Select -- /option); $('#'+child).trigger(change); $('#'+child).focus(); } ); } $(document).ready(function() { makeSublist('child','grandsun', true, ''); makeSublist('parent','child', false, '1'); }); /script if so are you getting any errors and are you sure your calling the right copy of jquery as I see it is different than whats in the second half of your post
[jQuery] Re: Multiple Jquery on one page
Liam, You are the Man, thankyou so much., It's working now. ThankYou for your time. On Tue, Jul 14, 2009 at 9:21 PM, Liam Potter radioactiv...@gmail.comwrote: remove the Jquery.js, as that is an old version. In the sublist script find this line $(#+child+' opti...@value='+ childVal +']').attr('selected','selected'); remove the @ symbol, so you have $(#+child+' option[value='+ childVal +']').attr('selected','selected'); You shouldn't just be directly copy and pasting the code examples given on demo pages/extracting directly from the zip, this will just cause you problems, and a ridiculously messy root folder. Sarm wrote: Thanks for reply but both jquery files are related plugin. If i will delete one jquery file then related will stop work. I know one jquery file is enough so if i will remove this one script language=javascript src=Jquery.js/script then Sublist part will be stop work and if i will remove this one script type=text/javascript src=js/jquery-1.3.2.js/script then calender will stop work. On Tue, Jul 14, 2009 at 7:49 PM, Liam Potter radioactiv...@gmail.commailto: radioactiv...@gmail.com wrote: You are including the jquery library multiple times, you only need to call jquery once. eg script type=text/javascript src=jquery.js/script script type=text/javascript src=jquery.plugin.js/script script type=text/javascript src=jquery.plugin.js/script script type=text/javascript src=jquery.plugin.js/script script type=text/javascript src=jquery.plugin.js/script script type=text/javascript $(function(){ $(#selector).plugin(); $(#selector).plguin(); }); /script Mean Mike wrote: I'm confused are you saying this doesn't work ? script language=javascript src=Jquery.js/script script language=javascript function makeSublist(parent,child,isSubselectOptional,childVal) { $(body).append(select style='display:none' id='+parent+child+'/select); $('#'+parent+child).html($(#+child+ option)); var parentValue = $('#'+parent).attr('value'); $('#'+child).html($(#+parent+child + .sub_+parentValue).clone()); childVal = (typeof childVal == undefined)? : childVal ; $(#+child+' opti...@value='+ childVal +']').attr('selected','selected'); $('#'+parent).change( function() { var parentValue = $('#'+parent).attr('value'); $('#'+child).html($(#+parent+child+ .sub_+parentValue).clone()); //if(isSubselectOptional) $('#'+child).prepend(option value='none' -- Select -- /option); $('#'+child).trigger(change); $('#'+child).focus(); } ); } $(document).ready(function() { makeSublist('child','grandsun', true, ''); makeSublist('parent','child', false, '1'); }); /script if so are you getting any errors and are you sure your calling the right copy of jquery as I see it is different than whats in the second half of your post
[jQuery] Re: Data Grid Live Edit
Nobody here to reply?
[jQuery] Data Grid Live Edit
Hi Everyone, I need Datagrid Live Edit for php. I search on google but but not get any good. Please tell me good one. Advance Thanks
[jQuery] Data Grid Live Edit
Hi Everyone, I need Datagrid Live Edit for php. I search on google but but not get any good. Please tell me good one. Advance Thanks
[jQuery] Multiple Upload songs
Hello Everyone! I am new at Jquery. I want to upload multiple song using Jquery Multiple upload plugin. I am not understanding how to get songs from Jquery and upload it on FTP. Anybody can help me? Advance Thanks Sarm
[jQuery] Re: Multiple Upload songs
NoBody here ? On Jun 23, 10:05 pm, Sarm [EMAIL PROTECTED] wrote: Hello Everyone! I am new at Jquery. I want to upload multiple song using Jquery Multiple upload plugin. I am not understanding how to get songs from Jquery and upload it on FTP. Anybody can help me? Advance Thanks Sarm