/ LJCJSCodeDoc / LJCCommonLib / LJC


Syntax

JavaScript
class LJC

Contains common JavaScript functions

Public Methods

Element Methods
AddEvent Adds an event handler.
AverageCharWidth Gets the average character width using the first selector element font.
Element Gets the HTMLElement by ID.
ElementStyle Gets the element ComputedStyle property.
Round Rounds and truncates to the provided place value.
SelectorStyle Gets the first matching selector ComputedStyle property.
TagElements Gets HTMLElements by Tag.
TextWidth Gets the text width.
Check Value Methods
HasElements Checks if an array has elements.
HasElementValue Checks if an element has a value.
HasText Checks if the text has a value.
IsKey Checks keydown for a supplied key.
IsNumber Checks if the text is a number.
IsShiftedKey Checks keydown for shift and the supplied key.
IsSimpleType Checks if the value is a primitive type.
IsString Checks if the value is a string.
Text and Value Methods
GetText Gets the element text.
GetValue Gets the input element value.
SetText Sets the element text.
SetValue Sets the input element value.
TextArea Methods
EventTextRows Sets the textarea rows for newlines.
GetTextCols Gets the textarea columns.
SetTextRows Sets the textarea rows for newlines.
Binary Search Methods
BinarySearch Returns the index of a search item in the array.
MiddlePosition Returns the middle index of the count value.
Other Methods
CreateJSON Creates JSON from the provided value.
Location Creates the debug location text.
Message Shows the service message.
MouseLocation Creates a mouse location object.
ParseJSON Parses JSON into an object.
ShowText Show text in textArea element.
ToArray Copy collection items to an indexed array.
Visibility Sets the element visibility.
34 Methods

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.