rickygri


Member since 02/23/2012

20 snippets

8 profile views

1 Comment(s) Posted

View their favorites

Profile

All time reputation: 567

Achievement

first submission:submitting first snipplet popular snippet:having a snipplet with 20 favorites

rickygri's Recent Snippets



« Prev 1 Next »
  1. FAV

    Javascript object template

    A template for a javascript object with a object.create shiv to condense into object prototypes
    JavaScript 7 views posted 5 years ago rickygri
  2. FAV

    OOP Javascript Template with constructor and inheritance

    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...
    JavaScript saved by 4 people 10 views posted 5 years ago rickygri
  3. FAV

    jQuery Plugin template

    Uses the object prototype to extend data. Instantiate as an object and use as specified below (bottom of the code)
    JavaScript 8 views posted 6 years ago rickygri
  4. FAV

    Callback for when images have loaded in an AJAX call

    More info: http://stackoverflow.com/questions/10908562/is-there-something-similar-to-window-load-for-executing-a-function-after
    JavaScript 8 views posted 6 years ago rickygri
  5. FAV

    If file exists function - server-side

    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.)
    PHP 6 views posted 6 years ago rickygri
  6. FAV

    Really basic jquery plugin template - with callback

    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...
    JavaScript 8 views posted 6 years ago rickygri
  7. FAV

    Full-screen element (video / image)

    Used to stretch a video / image to fill a background without skewing. Attach to resize events
    JavaScript 5 views posted 6 years ago rickygri
  8. FAV

    SQL query to delete all media and attachments in wordpress

    Run these queries (phpMyAdmin will do) to delete all media in the library, and remove all post attachment affiliation
    SQL 10 views posted 6 years ago rickygri
  9. FAV

    Basic HTML5 Template

    Basic HTML template including jQuery and HTML5 Shiv
    HTML 13 views posted 6 years ago rickygri
  10. FAV

    Fix 403 Forbidden wampserver tools (PHPmyadmin, sqlbuddy etc) on Windows 8

    To fix the issue with localhost under Windows 8 giving a 403 error (but working for 127.0.0.1) I did the following:
    Apache 5 views posted 7 years ago rickygri
  11. FAV

    Get current URL with PHP in Apache or IIS

    Get Current URL Path on Apache / IIS
    PHP saved by 16 people 11 views posted 7 years ago rickygri
  12. FAV

    jQuery Plugin Template

    This is a skeleton template for a jquery plugin with custom methods
    jQuery saved by 9 people 11 views posted 7 years ago rickygri
  13. FAV

    Clear form input on focus

    Clear text input when the user selects it (on focus)
    JavaScript 6 views posted 7 years ago rickygri
  14. FAV

    Stylesheet Template

    CSS stylesheet template - including HTML5 reset, tweaks for mobile including media queries, print reset styles, and base styles for standardization
    CSS saved by 63 people 166 views posted 7 years ago rickygri
  15. FAV

    Fluid width spacing of divs

    Space div elements evenly inside a wrapper without using float (no right spacing issue) so that all elements are flush to the edges.
    CSS 6 views posted 7 years ago rickygri
  16. FAV

    PDO Insert array function

    PDO-format insert array function
    PHP 11 views posted 7 years ago rickygri
  17. FAV

    POST form with jQuery (Ajax)

    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
    JavaScript 22 views posted 7 years ago rickygri
  18. FAV

    POST form with javascript (Non-Ajax)

    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.
    JavaScript 9 views posted 7 years ago rickygri
  19. FAV

    Embed flash with swfobject.js using arrays

    Shows how to use an array to embed swf objects with swfobject.js. This allows for multiple embeds (synced ad's etc.)
    JavaScript 1 views posted 7 years ago rickygri
  20. FAV

    Force downloadable

    Force downloadable file with php
    PHP 7 views posted 7 years ago rickygri
« Prev 1 Next »