Passle jQuery Plugin (C)2015 Passle Ltd. All rights reserved. Authors: David Stark (dave@passle.net), John Bosley (john@passle.net) What is it? The Passle jQuery plugin is designed to allow the embedding of Passle posts on a website. The plugin uses AJAX to fetch styles, scripts, and content from the Passle CDN and/or website. Posts are then inserted into the specified element. How to use 1. Make sure your page already includes jQuery >= version 1.5 2. Include the Passle jQuery plugin script. You can include it directly from our CDN with the following code: 3. You can now use the plugin as follows: $('#container').passle({ passleId: "2cxn" }); Or to display posts for a particular user: $('#container').passle({ userId: "vp37wl" }); where 'container' is the id of the element which you want to be the container for the Passle content, and '2cxn' is the shortcode of the Passle or 'vp37wl' is the shortcode of the user who's posts you want to display. Documentation .passle( options [, callBack ] ) Returns: jQuery options (type: Object) An object whose properties are used to specify details or override default options. When passed as an object this then retrieves scripts, stylesheets, and content via AJAX and inserts them into this.first(). You must specify *either* a passleId or a userId. passleId String (No default) *Optional* The ID of the Passle you want to retrieve posts from. userId String (No default) *Optional* The ID of the user whose posts you want to retrieve. numberOfPosts Number 20 *Optional* Posts retrieved when inserting or refreshing. layout String "full" *Optional* Specifies layout mode (see below). cssId String/Boolean passleId *Optional* Specifies which Passle's custom CSS to retrieve, alternatively false for default CSS styles. isotope String/Boolean "center" *Optional* Automatically arrange post blocks (see below). filter String (No default) *Optional* Filters retrieved posts by tag name. options (type: String) A string (either "refresh" or "remove") specifying an operation other than insertion. "refresh": Reloads content in target element. Does not fetch scripts and stylesheets. "remove": Cleans up after target instance (clear element, remove timers etc.). callBack (type: Function) A function that will be called once the method has successfully completed. FAQ How do I install the plugin? Simply include the plugin script in your page along with jQuery. Everything else will be handled automatically. Which versions of jQuery are supported? The plugin supports jQuery v1.5 and greater. I'm getting the error "Options argument is not valid. Refer to docs for more details." What do I do? You must include a valid options argument, either an object containing either a passleId or userId, or a string specifying an alternate operation. How do I get my passleId or userId? Contact our sales team at sales@passle.net for further details on getting these IDs. Everything looks weird, are the styles broken? The plugin will add stylesheets for the Passle content. However it is possible that existing style rules might override these imported styles. If this is the case either increase the specificity of your selectors for the conflicting styles, or overwrite the conflict directly. If that does not work or is not possible for some other reason, please submit a bug report. How do the various IDs work? What happens if I combine them? The passleId specifies a particular Passle to retrieve posts from. The userId retrieves that user's posts. Currently you can only specify either one or the other, not both. In addition to the default styles, you can also bring in a Passle's custom styles (colours, etc.) by specifying a cssId. If no cssId is specified this will default to the passleId property if provided. If neither are provided or the cssId is explicitly set to false, only the default plugin styles will be retrieved. What layout options do I have? The "full" layout option is designed for the full page width, and appears as a list of tiles. The "compact" layout option is designed to be used at smaller widths, and appears as a list of articles, automatically shrinking down to a supercompact view at <300px designed for page sidebars. The "none" layout option does not insert Passle CSS and should be used if you want to add your own custom styling. This option is also recommended in cases where there is significant conflict with page styles. What isotope options do I have? The "center" and true isotope options arrange the tiles in the full layout option in a grid. In particular, "center" applies margin:0 auto; to the container, while true leaves the block left aligned. The false option disables isotope, leaving the tiles unarranged. Contact Information For bug reports or issues please contact support@passle.net For questions or technical information regarding the plugin please contact technical@passle.net For licensing, sales, or all other inquiries please contact sales@passle.net