Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged object
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This code works for me without requiring any includes, plugins, or service packs. It should also integrate seamlessly with jquery. If needing to perform this process more than once on a page, make sure namedListItem variable is unique for each case (...
0
1216
posted 14 years ago by rumremix
This code works for me without requiring any includes, plugins, or service packs. It should also integrate seamlessly with jquery.
0
1061
posted 14 years ago by rumremix
SimpleSelector is a small DOM selector object with support for the most used selectors. It's also the default selector for the jLim JavaScript framework.
Why use SimpleSelector?
- very small, less than 2kb minified
- easy to use with $$()
- no...
1
1047
posted 15 years ago by freelancephp
Use this function to test whether or not a Javascript object is empty.
2
1131
posted 15 years ago by jlizarraga
The code below will loop through the properties in an object and alert a string. myObject is in JSON notation. The "for ( x in y)" construct does not work if the Prototype.js library is included on the page
0
1400
posted 15 years ago by elugardo
Detect if an object exists in an array or detect existance of a key in an object
1
816
posted 15 years ago by quickredfox
Runtime Object Evaluator; search for string object properties that start with !! and eval the content.
Very useful if you want to load JSON from file and evaluate its fields on effective usage or access global variables at runtime.
[Follow me on T...
1
687
posted 15 years ago by straps
object.forEach
=========
*Requires JavaScript 1.8*
`void object.forEach(function callback(item, value)[, thisObject])`
0
780
posted 16 years ago by Sephr
this funciton returns an XMLHttpRequest object for use in ajax pages
1
988
posted 16 years ago by jlvallelonga
Everything works as expected for the setTimeout() function until you try to call a method inside your ‘class’ (there are no real classes in JavaScript). Something like this won’t work:
setTimeout(this.methodToCall, time);
Passing a string r...
0
1373
posted 16 years ago by eden159
Every function has an object called the arguments object. This is an object that contains all the arguments that were passed to the function. The example below shows how to access these. Very rarely used but useful to know. Note: it may look like an...
2
1006
posted 17 years ago by 1man
Create a simple object and add properties and a method. Note where the object is parsed (not from top to bottom).
2
905
posted 17 years ago by 1man
Shows you how to link 2 objects together via the object function. If a value isn't found in the object, it will look for it in the linked object.
0
780
posted 18 years ago by 1man
Extend a custom object, and a pre-defined object(e.g. string) using .prototype available in JS.
1
903
posted 18 years ago by 1man
This functions allows you to create a new XMLHTTPRequest, it checks to see if the browser supports each method, if not it returns false.
4
1270
posted 18 years ago by 1man
Helps identify correctly the type of whatever you put as an argument. This was adapted from http://www.planetpdf.com/developer/article.asp?ContentID=testing_for_object_types_in_ja
3
1069
posted 18 years ago by rolandog
javascript in_array object frame.
Usar:
Mediceau.Navegacion.marcar(['nav1','nav2'])
...
_--Nav 1
_--Nav 2
_--Nav 3
_--Nav 4
0
874
posted 18 years ago by nicolaspar