[jQuery] Re: Referencing elements with 2 or more classes and no Id

2008-09-23 Thread Tester

Karl, you're right. It was a different issue. jQuery finds elements
without any problems assuming they exist when the "search" function is
called.

Really appreciate your advice.

On Sep 23, 5:04 am, Tester <[EMAIL PROTECTED]> wrote:
> @Ca-Phun Ung: The line break doesn't exist in the real code.
> @Karl Rudd: I'll have to do some more research then.
>
> Thanks for all your help!
>
> On Sep 22, 11:20 pm, "Ca-Phun Ung" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Karl's suggestion should work... I notice the HTML code you posted has a
> > line-break after "b-visibleUrl-", i.e.
> > class="b-visibleUrl b-visibleUrl-
> > short"
>
> > Is this line-break in your original HTML code? If so that might be the
> > problem.
>
> > On Tue, Sep 23, 2008 at 11:35 AM, Tester <[EMAIL PROTECTED]> wrote:
>
> > > Thanks for the suggestion! That's actually what I started with. While
> > > it's perfectly fine in situations with one class assigned to elements
> > > (e.g. ) it doesn't seem to detect it
> > > in my situation withtwoclasses.
>
> > > On Sep 22, 9:13 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> > > > Remember that jQuery uses CSS syntax for selectors. So, just like in
> > > > CSS to select a element with a particular class you add a "." to the
> > > > front of the class name.
>
> > > > In this case:
>
> > > >   $('div.b-visibleUrl-short')
>
> > > > Karl Rudd
>
> > > > On Tue, Sep 23, 2008 at 11:25 AM, Tester <[EMAIL PROTECTED]> wrote:
>
> > > > > My code looks like this:
> > > > > 
> > > > > 
> > > > >  
> > > > >    Title
>
> > > > >    www.learningjquery.com
> > > > >    www.learningjquery.com/
> > > > > 2007/02/
>
> > > > >  
> > > > > 
> > > > > 
> > > > > I can't modify HTML and need to access elements "b-visibleUrl-short."
> > > > > Tried:
>
> > > > > - $('[EMAIL PROTECTED]') and
> > > > > - $("div[class$='b-visibleUrl-short'")
>
> > > > > but nothing seems to work.
>
> > > > > Any ideas would be appreciated. Thanks!
>
> > --
> > Ca-Phun Ung
> > + Yelotofu 
> > + css, django, hongkong, html, javascript, php- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Referencing elements with 2 or more classes and no Id

2008-09-23 Thread Tester

@Ca-Phun Ung: The line break doesn't exist in the real code.
@Karl Rudd: I'll have to do some more research then.

Thanks for all your help!

On Sep 22, 11:20 pm, "Ca-Phun Ung" <[EMAIL PROTECTED]> wrote:
> Karl's suggestion should work... I notice the HTML code you posted has a
> line-break after "b-visibleUrl-", i.e.
> class="b-visibleUrl b-visibleUrl-
> short"
>
> Is this line-break in your original HTML code? If so that might be the
> problem.
>
>
>
> On Tue, Sep 23, 2008 at 11:35 AM, Tester <[EMAIL PROTECTED]> wrote:
>
> > Thanks for the suggestion! That's actually what I started with. While
> > it's perfectly fine in situations with one class assigned to elements
> > (e.g. ) it doesn't seem to detect it
> > in my situation with two classes.
>
> > On Sep 22, 9:13 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> > > Remember that jQuery uses CSS syntax for selectors. So, just like in
> > > CSS to select a element with a particular class you add a "." to the
> > > front of the class name.
>
> > > In this case:
>
> > >   $('div.b-visibleUrl-short')
>
> > > Karl Rudd
>
> > > On Tue, Sep 23, 2008 at 11:25 AM, Tester <[EMAIL PROTECTED]> wrote:
>
> > > > My code looks like this:
> > > > 
> > > > 
> > > >  
> > > >    Title
>
> > > >    www.learningjquery.com
> > > >    www.learningjquery.com/
> > > > 2007/02/
>
> > > >  
> > > > 
> > > > 
> > > > I can't modify HTML and need to access elements "b-visibleUrl-short."
> > > > Tried:
>
> > > > - $('[EMAIL PROTECTED]') and
> > > > - $("div[class$='b-visibleUrl-short'")
>
> > > > but nothing seems to work.
>
> > > > Any ideas would be appreciated. Thanks!
>
> --
> Ca-Phun Ung
> + Yelotofu 
> + css, django, hongkong, html, javascript, php


[jQuery] Re: Referencing elements with 2 or more classes and no Id

2008-09-23 Thread Ca-Phun Ung
Karl's suggestion should work... I notice the HTML code you posted has a
line-break after "b-visibleUrl-", i.e.
class="b-visibleUrl b-visibleUrl-
short"

Is this line-break in your original HTML code? If so that might be the
problem.

On Tue, Sep 23, 2008 at 11:35 AM, Tester <[EMAIL PROTECTED]> wrote:

>
> Thanks for the suggestion! That's actually what I started with. While
> it's perfectly fine in situations with one class assigned to elements
> (e.g. ) it doesn't seem to detect it
> in my situation with two classes.
>
> On Sep 22, 9:13 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> > Remember that jQuery uses CSS syntax for selectors. So, just like in
> > CSS to select a element with a particular class you add a "." to the
> > front of the class name.
> >
> > In this case:
> >
> >   $('div.b-visibleUrl-short')
> >
> > Karl Rudd
> >
> > On Tue, Sep 23, 2008 at 11:25 AM, Tester <[EMAIL PROTECTED]> wrote:
> >
> > > My code looks like this:
> > > 
> > > 
> > >  
> > >Title
> >
> > >www.learningjquery.com
> > >www.learningjquery.com/
> > > 2007/02/
> >
> > >  
> > > 
> > > 
> > > I can't modify HTML and need to access elements "b-visibleUrl-short."
> > > Tried:
> >
> > > - $('[EMAIL PROTECTED]') and
> > > - $("div[class$='b-visibleUrl-short'")
> >
> > > but nothing seems to work.
> >
> > > Any ideas would be appreciated. Thanks!
>



-- 
Ca-Phun Ung
+ Yelotofu 
+ css, django, hongkong, html, javascript, php


[jQuery] Re: Referencing elements with 2 or more classes and no Id

2008-09-22 Thread Karl Rudd

Something else is the problem. Two (or any number of) classes
shouldn't make a difference.

I just double checked the example you posted initially and it works as expect.

$('div.b-visibleUrl-short') finds the fire element and not the second.

$('div.b-visibleUrl') finds both elements.

Karl Rudd

On Tue, Sep 23, 2008 at 1:35 PM, Tester <[EMAIL PROTECTED]> wrote:
>
> Thanks for the suggestion! That's actually what I started with. While
> it's perfectly fine in situations with one class assigned to elements
> (e.g. ) it doesn't seem to detect it
> in my situation with two classes.
>
> On Sep 22, 9:13 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
>> Remember that jQuery uses CSS syntax for selectors. So, just like in
>> CSS to select a element with a particular class you add a "." to the
>> front of the class name.
>>
>> In this case:
>>
>>   $('div.b-visibleUrl-short')
>>
>> Karl Rudd
>>
>> On Tue, Sep 23, 2008 at 11:25 AM, Tester <[EMAIL PROTECTED]> wrote:
>>
>> > My code looks like this:
>> > 
>> > 
>> >  
>> >Title
>>
>> >www.learningjquery.com
>> >www.learningjquery.com/
>> > 2007/02/
>>
>> >  
>> > 
>> > 
>> > I can't modify HTML and need to access elements "b-visibleUrl-short."
>> > Tried:
>>
>> > - $('[EMAIL PROTECTED]') and
>> > - $("div[class$='b-visibleUrl-short'")
>>
>> > but nothing seems to work.
>>
>> > Any ideas would be appreciated. Thanks!
>


[jQuery] Re: Referencing elements with 2 or more classes and no Id

2008-09-22 Thread Tester

Thanks for the suggestion! That's actually what I started with. While
it's perfectly fine in situations with one class assigned to elements
(e.g. ) it doesn't seem to detect it
in my situation with two classes.

On Sep 22, 9:13 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> Remember that jQuery uses CSS syntax for selectors. So, just like in
> CSS to select a element with a particular class you add a "." to the
> front of the class name.
>
> In this case:
>
>   $('div.b-visibleUrl-short')
>
> Karl Rudd
>
> On Tue, Sep 23, 2008 at 11:25 AM, Tester <[EMAIL PROTECTED]> wrote:
>
> > My code looks like this:
> > 
> > 
> >  
> >    Title
>
> >    www.learningjquery.com
> >    www.learningjquery.com/
> > 2007/02/
>
> >  
> > 
> > 
> > I can't modify HTML and need to access elements "b-visibleUrl-short."
> > Tried:
>
> > - $('[EMAIL PROTECTED]') and
> > - $("div[class$='b-visibleUrl-short'")
>
> > but nothing seems to work.
>
> > Any ideas would be appreciated. Thanks!


[jQuery] Re: Referencing elements with 2 or more classes and no Id

2008-09-22 Thread Karl Rudd

Remember that jQuery uses CSS syntax for selectors. So, just like in
CSS to select a element with a particular class you add a "." to the
front of the class name.

In this case:

  $('div.b-visibleUrl-short')

Karl Rudd

On Tue, Sep 23, 2008 at 11:25 AM, Tester <[EMAIL PROTECTED]> wrote:
>
> My code looks like this:
> 
> 
>  
>Title
>
>www.learningjquery.com
>www.learningjquery.com/
> 2007/02/
>
>  
> 
> 
> I can't modify HTML and need to access elements "b-visibleUrl-short."
> Tried:
>
> - $('[EMAIL PROTECTED]') and
> - $("div[class$='b-visibleUrl-short'")
>
> but nothing seems to work.
>
> Any ideas would be appreciated. Thanks!
>