mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-02 20:37:15 +00:00
Revised test data
Testing against the output of cook.rb isn't satisfactory because of the bugs in it; instead we're now going to test against the tiddlywiki.com build products
This commit is contained in:
38
test/tiddlywiki.2.6.5/source/tiddlywiki/deprecated/Utilities.js
Executable file
38
test/tiddlywiki.2.6.5/source/tiddlywiki/deprecated/Utilities.js
Executable file
@@ -0,0 +1,38 @@
|
||||
//--
|
||||
//-- 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user