For:
"what is enclosed in divs of the
class "selectable"

http://docs.jquery.com/Attributes/html
$('div.selectable').html()

or

http://docs.jquery.com/Attributes/text
$('div.selectable').text()

you may need to loop through them () if there are more than one
http://docs.jquery.com/Core/each#callback


Getting started?   Seriously, the docs are a great great place to
start  :-)







On Dec 2, 6:04 am, stephane_r <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Sorry if my question is not worded properly, I'm new to jQuery and still do
> not understand its syntax. I've read a lot of examples and it did not help
> me much.
>
> I've got this really simple JS function:
>
> function getActiveText(e) {
>         var text = window.getSelection();
>         alert(text);
>
> }
>
> That returns the raw selection in an xhtml page.
>
> Now I want to limit what it returns to only what is enclosed in divs of the
> class "selectable".
>
> jQuery has the $('div.selectable') selector which selects all <div> elements
> with a class name of "selectable".
>
> What I'm missing is the glue code between my function and jQuery's selector.
>
> From there, I should be able to go further with jQuery. Now I'm just getting
> confused.
>
> Cheers,
> Stéphane
> --
> View this message in 
> context:http://www.nabble.com/First-steps-in-jQuery%3A-trying-to-figure-the-s...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to