[jQuery] Re: cascade plugin targeted to $(this)

2008-08-20 Thread Mike Nichols

I just updated the demo page at http://dev.chayachronicles.com/jquery/cascade/

At the bottom is an example of siblings being registered that are
within containers within a table.
The selectors could be cleaned up but it works for now...have a look
and let me know how that works for you.
One thing I'd point out is that you are using the same id multiple
times which is invalid html so that will choke any jquery selectors.
I'd recommend selecting by class in your markup instead of ids.
mike

On Aug 20, 12:46 am, pervak <[EMAIL PROTECTED]> wrote:
> Sorry I mean
>
> jQuery("div#resort_select select",this).cascade("div#country_sel
> select",{
>
> and
>
> jQuery("div#resort_select select",this).cascade(this,"div#country_sel
> select",{
>
> On Aug 19, 7:38 pm, Mike Nichols <[EMAIL PROTECTED]> wrote:
>
> > what is "div#kurort_select "?
> > I can't find that in your markup.
>
> > On Aug 19, 5:58 am, pervak <[EMAIL PROTECTED]> wrote:
>
> > > Hi all!
>
> > >  I've tried to usecascadeplugin from Mike Nichols and everything
> > > goes fine until i need to adjust it for the several dropdowns.
>
> > > [code]
> > > 
>
> > >         
> > >             
> > >             Country
> > > 
> > > Select the country
> > > Austria
> > > Bali
> > > 
> > >             
>
> > >             
> > >             Resort
> > > 
> > > Select resort
> > > Bad Blumau
> > > 
> > >                 
>
> > >             
>
> > >  
> > >             
> > >             Country
> > > 
> > > Select the country
> > > Austria
> > > Bali
> > > 
> > >             
>
> > >             
> > >             Resort
> > > 
> > > Select resort
> > > Bad Blumau
> > > 
> > >                 
>
> > >             
> > > 
> > > [/code]
>
> > > I need that each Country drop down affects only on it's Resort drop
> > > down.
>
> > > I write this code:
>
> > > jQuery(document).ready(function() {
> > >         jQuery("td#a_g_s div.all_geo_select").each(function(i){
>
> > >         jQuery("div#kurort_select select",this).cascade("div#country_sel
> > > select",{
> > >                                                         ajax: {
> > >                                                                 url: 
> > > 'countries_ajax.js',
> > >                                                                 data: { 
> > > myotherdata: jQuery("#ajax_header").html() }
> > >                                                         },
> > >                                                         template: 
> > > commonTemplate,
> > >                                                         match: commonMatch
> > >                 });
>
> > >     }); // each
>
> > > });
>
> > > When I change the first div's Country it affects on both Resort drop
> > > downs (but changing the second div's Country affects nothing!).
>
> > > If I write
>
> > > jQuery("div#kurort_select select",this).cascade(this,"div#country_sel
> > > select",{
>
> > > It affects on each drop down but the options become empty.
>
> > > Help please to say THIS tocascadeplugin.
>
> > > Thanks in advance, Alexander.


[jQuery] Re: cascade plugin targeted to $(this)

2008-08-20 Thread pervak

Sorry I mean

jQuery("div#resort_select select",this).cascade("div#country_sel
select",{

and

jQuery("div#resort_select select",this).cascade(this,"div#country_sel
select",{

On Aug 19, 7:38 pm, Mike Nichols <[EMAIL PROTECTED]> wrote:
> what is "div#kurort_select "?
> I can't find that in your markup.
>
> On Aug 19, 5:58 am, pervak <[EMAIL PROTECTED]> wrote:
>
> > Hi all!
>
> >  I've tried to use cascade plugin from Mike Nichols and everything
> > goes fine until i need to adjust it for the several dropdowns.
>
> > [code]
> > 
>
> >         
> >             
> >             Country
> > 
> > Select the country
> > Austria
> > Bali
> > 
> >             
>
> >             
> >             Resort
> > 
> > Select resort
> > Bad Blumau
> > 
> >                 
>
> >             
>
> >  
> >             
> >             Country
> > 
> > Select the country
> > Austria
> > Bali
> > 
> >             
>
> >             
> >             Resort
> > 
> > Select resort
> > Bad Blumau
> > 
> >                 
>
> >             
> > 
> > [/code]
>
> > I need that each Country drop down affects only on it's Resort drop
> > down.
>
> > I write this code:
>
> > jQuery(document).ready(function() {
> >         jQuery("td#a_g_s div.all_geo_select").each(function(i){
>
> >         jQuery("div#kurort_select select",this).cascade("div#country_sel
> > select",{
> >                                                         ajax: {
> >                                                                 url: 
> > 'countries_ajax.js',
> >                                                                 data: { 
> > myotherdata: jQuery("#ajax_header").html() }
> >                                                         },
> >                                                         template: 
> > commonTemplate,
> >                                                         match: commonMatch
> >                 });
>
> >     }); // each
>
> > });
>
> > When I change the first div's Country it affects on both Resort drop
> > downs (but changing the second div's Country affects nothing!).
>
> > If I write
>
> > jQuery("div#kurort_select select",this).cascade(this,"div#country_sel
> > select",{
>
> > It affects on each drop down but the options become empty.
>
> > Help please to say THIS to cascade plugin.
>
> > Thanks in advance, Alexander.


[jQuery] Re: cascade plugin targeted to $(this)

2008-08-19 Thread Mike Nichols

what is "div#kurort_select "?
I can't find that in your markup.


On Aug 19, 5:58 am, pervak <[EMAIL PROTECTED]> wrote:
> Hi all!
>
>  I've tried to use cascade plugin from Mike Nichols and everything
> goes fine until i need to adjust it for the several dropdowns.
>
> [code]
> 
>
>         
>             
>             Country
> 
> Select the country
> Austria
> Bali
> 
>             
>
>             
>             Resort
> 
> Select resort
> Bad Blumau
> 
>                 
>
>             
>
>  
>             
>             Country
> 
> Select the country
> Austria
> Bali
> 
>             
>
>             
>             Resort
> 
> Select resort
> Bad Blumau
> 
>                 
>
>             
> 
> [/code]
>
> I need that each Country drop down affects only on it's Resort drop
> down.
>
> I write this code:
>
> jQuery(document).ready(function() {
>         jQuery("td#a_g_s div.all_geo_select").each(function(i){
>
>         jQuery("div#kurort_select select",this).cascade("div#country_sel
> select",{
>                                                         ajax: {
>                                                                 url: 
> 'countries_ajax.js',
>                                                                 data: { 
> myotherdata: jQuery("#ajax_header").html() }
>                                                         },
>                                                         template: 
> commonTemplate,
>                                                         match: commonMatch
>                 });
>
>     }); // each
>
> });
>
> When I change the first div's Country it affects on both Resort drop
> downs (but changing the second div's Country affects nothing!).
>
> If I write
>
> jQuery("div#kurort_select select",this).cascade(this,"div#country_sel
> select",{
>
> It affects on each drop down but the options become empty.
>
> Help please to say THIS to cascade plugin.
>
> Thanks in advance, Alexander.