jasonseney


Member since 10/07/2008

Name: Jason

Location: nyc

Website: http://jasonseney.com

17 snippets

2935 profile views

3 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

jasonseney's Recent Snippets



« Prev 1 Next »
Will find all __TIF__ files and create new __JPG__ files of the same file name. - 97% quality - Resize _down only_ to `1024x1280`
0 468 posted 12 years ago by jasonseney
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 512 posted 12 years ago by jasonseney
Will return the host name that the site is running on. Example: `http://mysite.com` or `http://myspecialsite.com:102`
0 884 posted 13 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 587 posted 13 years ago by jasonseney
Basic create element and append it too another element.
0 580 posted 14 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 787 posted 14 years ago by jasonseney
[Credit - Sam Allen, Dot Net Perls](http://dotnetperls.com/remove-html-tags)
2 964 posted 14 years ago by jasonseney
1 671 posted 14 years ago by jasonseney
Basic example of calling a web service from code using GET. You can pass parameters in as query vars. Assumes return type of service is "String". Example return xml: <?xml> <string>US</string> @SNIPPLR TEAM: Please let me put xml at...
3 1085 posted 14 years ago by jasonseney
## Markup ## _Using square [ ] brackets for compatibility with Snipplr comment form_ [asp:PlaceHolder ID="StuffHolder" runat="server" ] <p>Some stuff in here</p> [/asp:PlaceHolder] ## Code Behind ## HtmlAttr[] attribu...
1 970 posted 14 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 794 posted 14 years ago by jasonseney
Will return a string that has any matched URLs wrapped in `<a>` tags. Example: `"This is a link to http://foobar.com . Please visit !"` Becomes: `"This is a link to <a href='http://foobar.com'>http://foobar.com</a> . Please visit!"` Note: Op...
2 4109 posted 15 years ago by jasonseney
Example uses an object from 3rd party API. Needed to turn it into xml for returning from a webservice.
0 546 posted 15 years ago by jasonseney
View version with full names here: [Dropdown-states](http://snipplr.com/view/4042/dropdown-states/ "View full names version")
3 1009 posted 15 years ago by jasonseney
Example: `var result = "Hello {0}! This is {1}.".format("world","foo bar");` Returns: `"Hello World! This is foo bar."`
2 861 posted 15 years ago by jasonseney
« Prev 1 Next »