jasonseney


Member since 10/07/2008

Name: Jason

Location: nyc

Website: http://jasonseney.com

7 snippets

326 profile views

3 Comment(s) Posted

View their favorites

Profile

Achievement

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 62 posted 9 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 57 posted 10 years ago by jasonseney
Basic create element and append it too another element.
0 58 posted 10 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 77 posted 10 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 106 posted 11 years ago by jasonseney
Example: `var result = "Hello {0}! This is {1}.".format("world","foo bar");` Returns: `"Hello World! This is foo bar."`
2 83 posted 11 years ago by jasonseney
« Prev 1 Next »