Sha256: 7231ed0a78fe3b4b9dc9b1b81e14d78f70ff9c3e8e9a6ab1d12fdbe0e5ca0674

Contents?: true

Size: 910 Bytes

Versions: 7

Compression:

Stored size: 910 Bytes

Contents

// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require_tree .

$(document).ready(function() {
    $('a[colorbox="true"]').live('click', function(e) {
        e.preventDefault();

        $.colorbox(
            {
                height: $(this).attr("colorbox_height") || false,
                width: $(this).attr("colorbox_width") || false,
                iframe: $(this).attr("colorbox_iframe") || false,
                href: $(this).attr('href'),
                opacity: 0.5
            });
    });
});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
colorbox-rails-0.0.7 app/assets/javascripts/colorbox-rails/colorbox-links.js
colorbox-rails-0.0.6 app/assets/javascripts/colorbox-rails/colorbox-links.js
colorbox-rails-0.0.5 app/assets/javascripts/colorbox-rails/colorbox-links.js
colorbox-rails-0.0.4 app/assets/javascripts/colorbox-rails/colorbox-links.js
colorbox-rails-0.0.3 app/assets/javascripts/colorbox-rails/colorbox-links.js
colorbox-rails-0.0.2 app/assets/javascripts/colorbox-rails/colorbox-links.js
colorbox-rails-0.0.1 app/assets/javascripts/colorbox-rails/application.js