[jQuery] Re: Question: Selecting all the links in div

2008-04-25 Thread ripple
If your working with two panels that have the class UserSubPanel then this should do the trick. Remove the id. $('div.UserSubPanel a').addClass('sideLink'); http://2whoa.com/dominate/ vladv <[EMAIL PROTECTED]> wrote: Thanks. I'll try it, but I'

[jQuery] Re: Question: Selecting all the links in div

2008-04-25 Thread vladv
Thanks. I'll try it, but I'm not sure how does that make any difference... What if I want to have two panels with the same css class and work with them both? I think I should be able to do that with jQuery. That is all the point, doesn't it? Thanks again. Vlad On Apr 24, 4:45 pm, ripple <[EMAIL

[jQuery] Re: Question: Selecting all the links in div

2008-04-24 Thread ripple
You have UserSubPanel as the id. But you call it as a class. $('div.UserSubPanel a').addClass('sideLink'); Call it by the id. $('#UserSubPanel a').addClass('sideLink'); http://2whoa.com/dominate/ vladv <[EMAIL PROTECTED]

[jQuery] Re: Question: Selecting all the links in div

2008-04-24 Thread vladv
The panel is asp.net Panel but if I look at generated html this is what I see: User Panel Link1 Link2 $(document).ready(function(){ $('div.UserSubPanel a').addClass('sideLink');

[jQuery] Re: Question: Selecting all the links in div

2008-04-24 Thread Armand Datema
Hi does this UserSubPanel is a gernal div like div id="UserSubPanel" or an asp.net div like div id="UserSubPanel" runat="server" if the second is the case than your div cannot be found because aps.netrwrites the id to something like wrote: > > Could you post the html? That would help a lot

[jQuery] Re: Question: Selecting all the links in div

2008-04-23 Thread Hamish Campbell
Could you post the html? That would help a lot. If the links exist your code should work. btw, ripple, you shouldn't need to use 'each' - addClass will apply to all objects in the collection. Using 'each' just adds overhead. On Apr 24, 3:14 am, ripple <[EMAIL PROTECTED]> wrote: > Why not loop th

[jQuery] Re: Question: Selecting all the links in div

2008-04-23 Thread ripple
In a very few instances I can see how livequery could help. But I see very few reason's for it. Why add another plugin include to a page which for livequery is 36.91 kb? You could just easily right a small function or a few lines of code to handle the new objects that are added from js aft

[jQuery] Re: Question: Selecting all the links in div

2008-04-23 Thread Glen Lipka
Are the links being added after the fact? Maybe post the page so we can see. It's probably something simple. You might need the LivejQuery plugin. That is used for when objects are added via JS after the page loads. Glen On Wed, Apr 23, 2008 at 8:14 AM, ripple <[EMAIL PROTECTED]> wrote: > Why

[jQuery] Re: Question: Selecting all the links in div

2008-04-23 Thread ripple
Why not loop through it? This is usually how I would do it. $(document).ready(function(){ $('#UserSubPanel a').each(function(i) { $(this).addClass('sideLink'); }); http://2whoa.com/dominate/ vladv <[EMAIL PROTECTED]> wrote: Thanks f

[jQuery] Re: Question: Selecting all the links in div

2008-04-23 Thread vladv
Thanks for your answer :) I tried this also, but no luck... What may be the problem? I have another jQuery function in the same place, but it works just fine can it be that nested div called in other way? Thanks again On Apr 23, 3:26 pm, "Giuliano Marcangelo" <[EMAIL PROTECTED]> wrote: > $

[jQuery] Re: Question: Selecting all the links in div

2008-04-23 Thread Giuliano Marcangelo
$(document).ready(function(){ $('#UserSubPanel a').addClass('sideLink'); }); 2008/4/23 vladv <[EMAIL PROTECTED]>: > > Selecting all the links in div.. > I know it should be really simple, but for some reason I can't make it > work.. > > I work with asp.net and try to run something