How to do custom jquery lives in 1.4.1?
Posted
by chobo2
on Stack Overflow
See other posts from Stack Overflow
or by chobo2
Published on 2010-05-11T23:27:37Z
Indexed on
2010/05/11
23:34 UTC
Read the original article
Hit count: 278
Hi
I been sort of using jquery livequery plugin and jquery live together. However now that I am using 1.4 it seems jquery livequery is not working 100%.
So I am not sure how to tackle this problem
I have this in livequery
$('#Description').livequery(function ()
{
$('#Description').htmlarea({
toolbar: [
["bold", "italic", "underline", "strikethrough", "|", "subscript", "superscript"],
["increasefontsize", "decreasefontsize"],
["orderedlist", "unorderedlist"],
["indent", "outdent"],
["link", "unlink"]
]
});
});
So everytime I loaded up my page. It would actually run that code in the livequery and display and if I went to another ajax tab and come back it would go into this again.
Now I am not sure how to change it to .live() jquery 1.4 since I just tried to do this
$('#Description').live(function ()
{
$('#Description').htmlarea({
toolbar: [
["bold", "italic", "underline", "strikethrough", "|", "subscript", "superscript"],
["increasefontsize", "decreasefontsize"],
["orderedlist", "unorderedlist"],
["indent", "outdent"],
["link", "unlink"]
]
});
});
and it does not seem to work. the plugin is not binded and the rich html editor is not displayed.
© Stack Overflow or respective owner