Giter VIP home page Giter VIP logo

tabulator's Introduction

Introduction

This plugin provides a simplest way to add tabs controls in your apps.

I took the idea from here and implemented it as a Rails plugin.

Installation

First of all, your app’s header has to include the jquery file. Something like this:

<%= javascript_include_tag "jquery" %>

Second, install plugin and run rake task

script/plugin install git://github.com/undr/tabulator.git
rake tabulator:install

Uninstallation

Run rake task

rake tabulator:remove

and remove folder with plugin

Usage

<% content_for :head do %>
  <%= tabulator_init %>
<% end %>

<% tabulator do |t| %>
  <% t.tab(:tab_id1, "Tab title #1") do -%>
    Some content for tab #1
  <% end -%>
  <% t.tab(:tab_id2, "Tab title #2", true) do -%> # An active tab
    Some content for tab #2
  <% end -%>
<% end %>

<% tabulator do |t| %>
  <% t.tab(:tab_id3, "Tab title #1", render(:partial => "some_template", :locals => {:number => 5})) -%>
  <% t.tab(:tab_id4, "Tab title #2", render(:partial => "some_template"), true) -%> # An active tab
  <% t.status("Some status text") %>
<% end %>

<% tabulator(:partial => "my_own_tabs_template", :height => "400px") do |t| %>
  <% t.tab(:tab_id5, "Tab title #1", "Some content for tab #1" -%>
  <% t.tab(:tab_id6, "Tab title #2", "Some content for tab #1", true) -%> # An active tab
  <% t.status("Some status text") %>
<% end %>

Copyright © 2010 undr, released under the MIT license

tabulator's People

Contributors

undr avatar

Stargazers

 avatar

Watchers

 avatar  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.