Is key exists in JavaScript object
If its necessary to define is item with any key exists in the JavaScript object
If its necessary to define is item with any key exists in the JavaScript object
To count how many attributes is in the JavaScript object we can use next code:
1 | var count = Object.keys(myObject).length; |
Using JavaScript function ‘splice’ for removing items from JavaScript array
to move:
1 | jQuery("#NodesToMove").detach().appendTo('#DestinationContainerNode'); |
to copy:
1 | jQuery("#NodesToMove").appendTo('#DestinationContainerNode'); |
How to remove text nodes only from any tag container
Get from JavaScript array unique values only
If its necessary merge 2 or even more JavaScript objects – next function will help in it
Sometimes developers should resolve the task – how to connect site which is in iframe tag and the parent site using JavaScript. That was the problem in the past, but not now as we can use HTML5 features.
There is a simple trick to avoid such troubles – reinitialize function jQuery.live in the next way