You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gets the text of the elements selected by the specified *selector*.
155
177
178
+
**Parameters**:
179
+
180
+
{string} **selector**: The CSS-selector to specify the element(s) to read from (see [jQuery Selectors](https://api.jquery.com/category/selectors/) for a detailed overview of available selectors). In addition, the selector can also be a DOM-element.
181
+
182
+
{boolean|null} **excludeChildren**: true, if the result for an element should also include the text of the children (concatenated by newline if needed), or false, if only the text of the selected element should be read (default true).
Gets the concatenated text of the specified element(s).
193
+
194
+
**Parameters**:
195
+
196
+
{string} **selector**: The CSS-selector to specify the element(s) to read from (see [jQuery Selectors](https://api.jquery.com/category/selectors/) for a detailed overview of available selectors). In addition, the selector can also be a DOM-element.
197
+
198
+
{boolean|null} **excludeChildren**: true, if the result for an element should also include the text of the children (concatenated by newline if needed), or false, if only the text of the selected element should be read (default true).
199
+
200
+
**Example Usage**:
201
+
```javascript
202
+
var text =Breinify.UTL.text('input[attr="name"]', false);
{string} **selector**: The CSS-selector to specify the element(s) to read from (see [jQuery Selectors](https://api.jquery.com/category/selectors/) for a detailed overview of available selectors). In addition, the selector can also be a DOM-element.
213
+
214
+
{string} **value**: The text to be set.
156
215
157
-
texts: function() { return []; },
158
-
text: function() { return null; },
159
-
md5: function () { return null; },
160
-
isEmpty: function() { return false; }
216
+
**Example Usage**:
217
+
```javascript
218
+
var text =Breinify.UTL.text('input[attr="name"]', false);
219
+
console.log(text);
220
+
```
221
+
<br/>
222
+
223
+
* {string} **Breinify.UTL.md5(value)**:<br/>
224
+
Gets the hashed value for the passed *value*.
225
+
226
+
**Parameters**:
227
+
228
+
{string} **value**: The value to be hashed.
229
+
230
+
**Example Usage**:
231
+
```javascript
232
+
var md5 =Breinify.UTL.text('HELLO', false);
233
+
window.alert('The hashed value of "HELLO" is '+ md5);
234
+
```
235
+
<br/>
236
+
237
+
* {boolean} **Breinify.UTL.isEmpty(value)**:<br/>
238
+
Checks if the passed *value* is empty. Empty has a different meaning for different types. An *object* is assumed to be empty:
239
+
* if it is plain and has no attributes
240
+
* if it is a string equal to *''* after it is trimmed
241
+
* if it is *null*
242
+
243
+
**Parameters**:
244
+
245
+
{mixed} **value**: The value to be checked.
246
+
247
+
**Example Usage**:
248
+
```javascript
249
+
Breinify.UTL.isEmpty({}); // returns true
250
+
Breinify.UTL.isEmpty(''); // returns true
251
+
Breinify.UTL.isEmpty(null); // returns true
252
+
```
253
+
<br/>
161
254
162
255
##### Breinify.UTL.events
163
256
@@ -168,7 +261,7 @@ For simplicity the library provides the possibility to handle/react to specific
168
261
169
262
**Parameters**:
170
263
171
-
{string} **selector**: The CSS-selector to specify the element(s) to listen for click-events (see [jQuery Selectors](https://api.jquery.com/category/selectors/) for a detailled overview of available selectors).
264
+
{string} **selector**: The CSS-selector to specify the element(s) to listen for click-events (see [jQuery Selectors](https://api.jquery.com/category/selectors/) for a detailed overview of available selectors).
172
265
173
266
{function} **func**: The function to execute when the event is captured. The function retrieves an *event* object which can be used to control the further processing. In addition, the handling function also has access to the DOM-element that the handler was bound to using *this*. For further details, have a look at [jQuery Event Handling](https://learn.jquery.com/events/inside-event-handling-function/).
0 commit comments