GithubHelp home page GithubHelp logo

imclab / jquery-intelligist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from srobbin/jquery-intelligist

0.0 2.0 0.0 61 KB

a jQuery plugin that makes it easy to share and demo code in-page, using GitHub gists.

Home Page: http://srobbin.com/jquery-plugins/intelligist/

License: MIT License

jquery-intelligist's Introduction

Intelligist

a jQuery plugin that makes it easy to share multiple, executable GitHub gists

Demo

See Intelligist in action

Requirements

jQuery Chosen (optional, it is auto-downloaded if not already included on the page)

How to use

Using Intelligist is easy. The general idea is:

$(selector).intelligist( gists, options );

Just select the container, and pass in an object of gists that you'd like to display.

$("#demo").intelligist({
      "1973984": "Welcome to Intelligist"
    , "1973990": "Live CSS preview"
    , "1973575": "Live JS preview"
}, { exec: true });

The object is made of keys (the gist ID) and values (titles for the drop-down menu).

Note: In this example, we are setting the "exec" option to true. This instructs Intelligist to execute the code after the gist is displayed. It is optional, and disabled by default.

Important: If you are using the "exec" option, your Gist must be set to the correct language. Intelligist uses the Gist language to determine how it should execute the code.

Options

exec

Should the gist be executed after it is loaded onto the page? Note: If you are using this option, your Gist must be set to the correct language (e.g. CSS or JavaScript) (default=false)

before

A function to be called before the gist is loaded onto the page. It is passed two variables, the ID of the previous gist and the ID of the newly selected gist. e.g. function(oldGistId, newGistId) {}

after

A function to be called after the gist is loaded onto the page. It is passed one variable, the ID of the newly selected gist. e.g. function(newGistId) {}

Thank yous

jquery-intelligist's People

Contributors

srobbin avatar

Watchers

JT5D avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.