Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JQuery Library for Embedly.
branch: master

This branch is 130 commits behind embedly:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


Embedly - JQuery - An OEmbed Library to Replace Links with Content

Embedly - JQuery is a JQuery Library for Embedly that will replace links with content. It follows the oEmbed spec ( for content retrieval, while utilizing as a single endpoint.


The most up-to-date documentation can be found on the README


Requires JQuery 1.3.1 or greater:

<script type="text/javascript" src=""></script>

Using Embedly-JQuery

There are two ways to interact with this library. You can call Embedly directly or use CSS Selectors to replace links

Call Directly

Will Return a JSON object representing an oembed or null.:

#Alert the tile of a video
$.embedly('', {}, function(oembed){

# Call with maxWidth option set to 600px and maxHeight option set to 400px
          {maxWidth:600, maxHeight:400},

CSS Selector

Use a CSS selector to replace every valid link with an embed on the page.:

# Replace all valid links

    # Replace a subset of links

    # Replace with maxWidth option set to 600px and method option set to 'after'

    # Replace only Hulu links
    $('a').embedly({maxWidth:600,'urlRe': /http:\/\/(www\.hulu\.com\/watch.*)/i,'method':'after'});

Valid Options

  • maxWidth - a number representing the "max width" in pixels a piece of content can be displayed in your page. (Default : original width of the content)

  • maxHeight - a number representing the "max height" in pixels a piece of content can be displayed in your page. (Default : original height of the content)

  • urlRe = a regular expression representing what links to show content for. (Default : all available Embedly sources, see Use : to generate regular expressions for a specific set of sources.

  • method - a string value either "replace" or "after" to tell Embedly how to place the content in your page. (Default : 'replace')

    • replace - replaces the link with the content.
    • after - inserts the content after the link.
    • afterParent - inserts the content after the parent element.
  • wrapElement - a string value representing the valid html element to wrap the content in. (Default : 'div')

  • className - a string value representing a CSS class you would like to

    assign to the wrapElement. (Default : 'embed')

  • addImageStyles - a boolean value representing whether or not Embedly should use the style element to resize images based on the maxWidth and maxHeight parameters (Default : true)


Examples can be found at -



Embedly URLS

Something went wrong with that request. Please try again.