On Jan 18, 4:55 pm, Scott Sauyet wrote:
> It's a
> very
typo:
difficult
-- Scott
On Jan 18, 11:46 am, Mircea wrote:
> Yes, I want to be able to select a part of the text and add a span to
> it. Can this be done?
It's a very difficult problem to solve in the general case.
Imagine this markup:
It's a
very difficult problem
to
solve in the general c
Thanx a lot Morning.
It does work this way
All the best!
the variable name/reference is "$spn"
so it would be:
$("p").append($spn);
your line of
$("p").append("spn")
does exactly what you told it to do :-)
On Jan 18, 2:34 pm, Mircea wrote:
> I've added
>
> $("p").append("spn")
>
> It ads only the text spn at the bottom of the text. I probably di
I've added
$("p").append("spn")
It ads only the text spn at the bottom of the text. I probably did not
used the append function right to pass the variable to p.
Thanx
it probably is working, but you failed to *do* anything with the
generated tag... that's why i added as a comment:
// append/set this '$spn' inside another DOM object
On Jan 18, 12:29 pm, Mircea wrote:
> Thanx for the code.
> It does not work to me. I am a newbye is JQuery, please excuse the
>
Thanx for the code.
It does not work to me. I am a newbye is JQuery, please excuse the
dumb questions...
This is my code and markup:
http://www.w3.org/TR/html4/loose.dtd";>
http://code.jquery.com/jquery-latest.js";>
http://jqueryui.com/latest/ui/
ui.core.js">
http://jqueryui.com/l
yes, it indeed is
selection = getSelectedText();
if(selection.length >= 3) {
$(this).html($(this).html().addClass("selected");
}
to
selection = getSelectedText();
if(selection.length >= 3) {
var $spn = $("").html(selection).addClass
("selected");
// append/set this '$spn' inside
Yes, I want to be able to select a part of the text and add a span to
it. Can this be done?
Thank you.
9 matches
Mail list logo