Member since 10/07/2008

Name: Jason

Location: nyc

Website: http://jasonseney.com

7 snippets

2414 profile views

3 Comment(s) Posted

View their favorites



first submission:submitting first snipplet

jasonseney's Recent SnippetsTagged javascript

« Prev 1 Next »
Safely loads a javascript file asynchronously Example: (function() { __safeLoadScript("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", function() { alert(jQuery); }); })();
0 440 posted 12 years ago by jasonseney
Similar to [Get Elements by Class Name]( http://snipplr.com/view/1696/get-elements-by-class-name/), but with optional "tag" parameter. Performance is increased by first retrieving the desired tag if available.
0 508 posted 13 years ago by jasonseney
Basic create element and append it too another element.
0 501 posted 13 years ago by jasonseney
Returning a boolean inside of jQuery's $.each() function will only break the loop. To get a return value, you can convert the jQuery object to array and use a regular for loop in javascript.
0 695 posted 13 years ago by jasonseney
Based on some comments in [StackOverflow Question](http://stackoverflow.com/questions/95875/javascript-check-to-see-if-a-variable-is-an-object "How to check if a variable is an object")
3 713 posted 14 years ago by jasonseney
Example: `var result = "Hello {0}! This is {1}.".format("world","foo bar");` Returns: `"Hello World! This is foo bar."`
2 752 posted 14 years ago by jasonseney
« Prev 1 Next »