Profile
Achievement
rickygri's Recent Snippets
- All /
« Prev 1 Next »
A template for a javascript object with a object.create shiv to condense into object prototypes
0
942
posted 10 years ago by rickygri
From @blixt http://stackoverflow.com/users/119081/blixt
As you can see, the classes correctly interact with each other (they share the static id from MyClass, the announce method uses the correct get_name method, etc.)
One thing to note is the...
1
936
posted 10 years ago by rickygri
Uses the object prototype to extend data. Instantiate as an object and use as specified below (bottom of the code)
0
889
posted 11 years ago by rickygri
More info: http://stackoverflow.com/questions/10908562/is-there-something-similar-to-window-load-for-executing-a-function-after
0
1015
posted 11 years ago by rickygri
This function can be used to check if a file exists using the HTTP header response. Example use, when looping through cached JSON objects (instagram API, etc.)
0
1064
posted 11 years ago by rickygri
This is a really basic skeleton template for jQuery plugins. It provides a callback function which can be called anywhere in your plugin with base.success(); This will return the current element, but you can pass anything you like back by changing th...
0
1011
posted 11 years ago by rickygri
Used to stretch a video / image to fill a background without skewing. Attach to resize events
0
973
posted 11 years ago by rickygri
Run these queries (phpMyAdmin will do) to delete all media in the library, and remove all post attachment affiliation
1
2580
posted 11 years ago by rickygri
To fix the issue with localhost under Windows 8 giving a 403 error (but working for 127.0.0.1) I did the following:
0
1213
posted 11 years ago by rickygri
This is a skeleton template for a jquery plugin with custom methods
1
943
posted 12 years ago by rickygri
CSS stylesheet template - including HTML5 reset, tweaks for mobile including media queries, print reset styles, and base styles for standardization
7
1431
posted 12 years ago by rickygri
Space div elements evenly inside a wrapper without using float (no right spacing issue) so that all elements are flush to the edges.
0
757
posted 12 years ago by rickygri
This send any value via POST to a PHP page. It is done with AJAX, so the POST return can be used on the same page as the submit
0
1166
posted 12 years ago by rickygri
This javascript function takes the URL of the target page and an associative array of name/values paires and POSTs the data to the supplied URL by dynamically creating a form and then submitting it.
0
2809
posted 12 years ago by rickygri
Shows how to use an array to embed swf objects with swfobject.js. This allows for multiple embeds (synced ad's etc.)
0
822
posted 12 years ago by rickygri