@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. <div class="b-visibleUrl-short">) 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:
> > > > ================================
> > > > <div class="a-webResult a-result">
> > > >  <div class="b-webResult b-result">
> > > >    <div class="b-title">Title</div>
>
> > > >    <div class="b-visibleUrl b-visibleUrl-
> > > > short">www.learningjquery.com</div>
> > > >    <div class="b-visibleUrl b-visibleUrl-long">www.learningjquery.com/
> > > > 2007/02/</div>
>
> > > >  </div>
> > > > </div>
> > > > ================================
> > > > 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 <http://yelotofu.com>
> + css, django, hongkong, html, javascript, php

Reply via email to