jasonseney


Member since 10/07/2008

Name: Jason

Location: nyc

Website: http://jasonseney.com

17 snippets

4082 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 673 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 691 posted 13 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 1156 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 783 posted 14 years ago by jasonseney
Basic create element and append it too another element.
0 774 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 1024 posted 15 years ago by jasonseney
[Credit - Sam Allen, Dot Net Perls](http://dotnetperls.com/remove-html-tags)
2 1232 posted 15 years ago by jasonseney
1 925 posted 15 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 1350 posted 15 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 1256 posted 15 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 1012 posted 15 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 4676 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 725 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 1281 posted 16 years ago by jasonseney
Example: `var result = "Hello {0}! This is {1}.".format("world","foo bar");` Returns: `"Hello World! This is foo bar."`
2 1136 posted 16 years ago by jasonseney
« Prev 1 Next »