Coder Social home page Coder Social logo

fredngo / bootbox-rails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rocsci/bootbox-rails

0.0 1.0 0.0 127 KB

This fork implements https://github.com/rocsci/bootbox-rails/pull/3. Do not use this fork if the pull request has been honoured.

License: MIT License

Ruby 98.74% Shell 0.88% JavaScript 0.37%

bootbox-rails's Introduction

bootbox-rails Build Status

Wrappers for JavaScript alert(), confirm() and other flexible dialogs using Twitter's bootstrap framework for Rails 3.1+

Check out how to use bootbox.js at http://bootboxjs.com/

Installation

First, put this line in your Gemfile:

gem 'bootbox-rails'

Don't forget to add jquery-rails gem into your Gemfile. Also you may use very handy bootstrap-sass gem to add full stack of Twitter Bootstrap into your app.

Then run bundle install to update your application's bundle.

Now you need to edit your app/assets/javascripts/application.js file and add the following line:

//= require bootbox

And you're done!

Usage

Now you able to use modals like this:

<a href="#" id="link">Click me!</a>

<script>
$(function() {
  $('#link').click(function() {
    bootbox.alert("Hello world!");  
  })
})
</script>

Please see http://paynedigital.com/bootbox for full usage instructions, or head over to http://bootboxjs.com for a demo page

License

The MIT License

bootbox-rails's People

Contributors

tanraya avatar mmoss avatar

Watchers

Fred Ngo 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.