mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-18 07:44:51 +00:00
a1c8ac624f
There are still some whitespace and attribute ordering issues, but the result runs correctly.
39 lines
607 B
JavaScript
Executable File
39 lines
607 B
JavaScript
Executable File
//--
|
|
//-- Deprecated utility functions
|
|
//-- Use the jQuery functions directly instead
|
|
//--
|
|
|
|
// Remove all children of a node
|
|
function removeChildren(e)
|
|
{
|
|
jQuery(e).empty();
|
|
}
|
|
|
|
// Remove a node and all it's children
|
|
function removeNode(e)
|
|
{
|
|
jQuery(e).remove();
|
|
}
|
|
|
|
// Return the content of an element as plain text with no formatting
|
|
function getPlainText(e)
|
|
{
|
|
return jQuery(e).text();
|
|
}
|
|
|
|
function addClass(e,className)
|
|
{
|
|
jQuery(e).addClass(className);
|
|
}
|
|
|
|
function removeClass(e,className)
|
|
{
|
|
jQuery(e).removeClass(className);
|
|
}
|
|
|
|
function hasClass(e,className)
|
|
{
|
|
return jQuery(e).hasClass(className);
|
|
}
|
|
|