C# Класс Open.Core.Html

HTML constants and DOM manipulation.
Показать файл Открыть проект

Открытые методы

Метод Описание
Append ( jQueryObject parent, string tag ) : jQueryObject

Creates and appends a DIV element within the given parent.

AppendDiv ( jQueryObject parent ) : jQueryObject

Creates and appends a DIV element within the given parent.

ChildAt ( int index, jQueryObject parent ) : jQueryObject

Retrieves the child at the specified index, otherwise Null.

CreateDiv ( ) : jQueryObject

Creates a DIV element.

CreateElement ( string tag ) : jQueryObject

Creates a new element with the given tag.

CreateImage ( string src, string alt ) : jQueryObject

Creates an IMG element.

CreateSpan ( ) : jQueryObject

Creates a SPAN element.

GetOrCreateId ( jQueryObject element ) : string

Gets the elements ID, creating a unique ID of the element doesn't already have one.

Height ( string cssSelector ) : int

Retrieves the height of the specified element.

OuterHtml ( jQueryObject element ) : string

Retreives the OuterHtml of the given element.

ReplaceWith ( string replaceSeletor, jQueryObject withReplacement, bool copyCssClasses ) : void

Replaces an element with the given object.

SetDisabled ( jQueryObject input, bool isEnabled ) : void

Adds or removes the 'disabled' attribute on the given INPUT element.

SpanIndent ( int pixels ) : string

Creates a SPAN element with a magin-left set to the specified pixels (useful for indenting text).

ToBold ( string text ) : string

Wraps the given text in elements.

ToHyperlink ( string url, string text, LinkTarget target ) : string

Formats the URL as a hyperlink.

Width ( string cssSelector ) : int

Retrieves the width of the specified element.

Приватные методы

Метод Описание
ToHyperlink ( string url ) : string

Описание методов

Append() публичный статический Метод

Creates and appends a DIV element within the given parent.
public static Append ( jQueryObject parent, string tag ) : jQueryObject
parent jQueryObject The parent element to insert into
tag string The tag name (NOT including angle brackets).
Результат jQueryObject

AppendDiv() публичный статический Метод

Creates and appends a DIV element within the given parent.
public static AppendDiv ( jQueryObject parent ) : jQueryObject
parent jQueryObject The parent element to insert into
Результат jQueryObject

ChildAt() публичный статический Метод

Retrieves the child at the specified index, otherwise Null.
public static ChildAt ( int index, jQueryObject parent ) : jQueryObject
index int The index of the child (0-based).
parent jQueryObject The parent to look within.
Результат jQueryObject

CreateDiv() публичный статический Метод

Creates a DIV element.
public static CreateDiv ( ) : jQueryObject
Результат jQueryObject

CreateElement() публичный статический Метод

Creates a new element with the given tag.
public static CreateElement ( string tag ) : jQueryObject
tag string The HTML tag.
Результат jQueryObject

CreateImage() публичный статический Метод

Creates an IMG element.
public static CreateImage ( string src, string alt ) : jQueryObject
src string The URL to the image.
alt string The alternative text for the image.
Результат jQueryObject

CreateSpan() публичный статический Метод

Creates a SPAN element.
public static CreateSpan ( ) : jQueryObject
Результат jQueryObject

GetOrCreateId() публичный статический Метод

Gets the elements ID, creating a unique ID of the element doesn't already have one.
public static GetOrCreateId ( jQueryObject element ) : string
element jQueryObject The element to get the ID for.
Результат string

Height() публичный статический Метод

Retrieves the height of the specified element.
public static Height ( string cssSelector ) : int
cssSelector string The CSS selector of the element to measure.
Результат int

OuterHtml() публичный статический Метод

Retreives the OuterHtml of the given element.
public static OuterHtml ( jQueryObject element ) : string
element jQueryObject The element to retrieve the HTML for.
Результат string

ReplaceWith() публичный статический Метод

Replaces an element with the given object.
public static ReplaceWith ( string replaceSeletor, jQueryObject withReplacement, bool copyCssClasses ) : void
replaceSeletor string The CSS selector the element(s) to replace.
withReplacement jQueryObject The element to insert.
copyCssClasses bool Flag indicating if CSS classes should be copied from the old element to the new one.
Результат void

SetDisabled() публичный статический Метод

Adds or removes the 'disabled' attribute on the given INPUT element.
public static SetDisabled ( jQueryObject input, bool isEnabled ) : void
input jQueryObject The input element to effect.
isEnabled bool The enabled value.
Результат void

SpanIndent() публичный статический Метод

Creates a SPAN element with a magin-left set to the specified pixels (useful for indenting text).
public static SpanIndent ( int pixels ) : string
pixels int The number of pixels to indent.
Результат string

ToBold() публичный статический Метод

Wraps the given text in elements.
public static ToBold ( string text ) : string
text string The text to wrap.
Результат string

ToHyperlink() публичный статический Метод

Formats the URL as a hyperlink.
public static ToHyperlink ( string url, string text, LinkTarget target ) : string
url string The url to link to.
text string The display text of the link (null to use the URL).
target LinkTarget The target attribute.
Результат string

Width() публичный статический Метод

Retrieves the width of the specified element.
public static Width ( string cssSelector ) : int
cssSelector string The CSS selector of the element to measure.
Результат int