Is there a way -- I've wracked my brains on this but I'm a jQuery
novice -- to determine what the first letter of a selector is?

For example, if the very first letter of a paragraph is a quote (or a
‘ , or a “ , etc) I would like to apply a negative text-
indent to the found paragraph so as to replicate "hanging quotes" that
are commonplace in the print world.

The code I've come up with is:

        $("p:contains(“), h1:contains(“), h2:contains(“)").css({'text-
indent':'-0.3em'});

but this grabs any p or h1 or h2 that *contains* an opening curly
quote; not what I'm looking for. I need it to select paragraphs that
*start* with the opening curly quote.

Incidentally, I could not get this to work when I was searching for     $
("p:contains(\&\#8220\;)... but it worked when I entered an actual
opening curly quote in the search (as above top). I tried both single
and double escapes too.

Any help would be greatly appreciated. I would love to roll this out
as a plugin, since it seems simple and really enhances the look of a
page of text to have the opening quotes hanging properly.

Reply via email to