This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= javascript_include_tag 'right/tabs' %> | |
<ul class='rui-tabs-carousel' id='carousel-tabs'> | |
<ul> | |
<li><a href='#tab-1'><img src='/images/test/1-min.jpg' /></a></li> | |
<li><a href='#tab-2'><img src='/images/test/2-min.jpg' /></a></li> | |
<li><a href='#tab-3'><img src='/images/test/3-min.jpg' /></a></li> | |
<li><a href='#tab-4'><img src='/images/test/4-min.jpg' /></a></li> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).onReady(function() { | |
var box = new Lightbox(); | |
var text = $('lorem-ipsum-text'); | |
$("box-toggler").onClick(function() { | |
box.show(text).resize(); | |
return false; | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JSONP support in action | |
new Xhr('/bla/bla/bla', { | |
jsonp: true, // <- will use the 'callback' name by default | |
}).send('some=data'); | |
// or like that | |
Xhr.load('/bla/bla/bla', { | |
jsonp: 'mycustomname' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Driver = { | |
add: function(event) { | |
event.stop(); | |
$(this.get('rel')) | |
.insert(Driver.template(this)) | |
.subNodes().last().show('fade'); | |
}, | |
remove: function(event) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Nested = new Class({ | |
initialize: function(element){ | |
this.element = element; | |
this.template = eval(this.element.get('data-template')); | |
var click_behavior = Event.delegate({ | |
'.add_nested': function(e){ | |
e.stop(); | |
$(e.originalTarget.get('rel')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// you could use the shared module feature | |
var SharedModule = { | |
callback: function() { | |
/// .... | |
} | |
}; | |
var Dog = new Class({ | |
include: SharedModule, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Klass = new Class({ | |
extend: { | |
classMethod: function() {}, | |
CLASS_CONSTANT: 'boo' | |
} | |
}); |