Skip to content

Instantly share code, notes, and snippets.

@simon-lang
Created July 31, 2012 22:48
Show Gist options
  • Select an option

  • Save simon-lang/3221407 to your computer and use it in GitHub Desktop.

Select an option

Save simon-lang/3221407 to your computer and use it in GitHub Desktop.
broken sample responsive modules
;(function($) {
window.Digicon.Navigation = window.ProjectName.SomeModule || window.ProjectName.Module(function() {
var _queries = [
{
context: 'mobile',
callback: Digicon.Navigation.triggerMobile
},
{
context: 'skinny',
callback: Digicon.Navigation.triggerSkinny
}
];
return {
init: function() {
MQ.init(_queries);
},
triggerMobile: function() {
$el.on('click', '.some-action', this.events.someAction);
},
triggerSkinny: function() {
$el.on('click', '.some-action', this.events.someAction);
},
attachEvents: function() {
$('.trigger-mobile').on('click', '', this.triggerMobile);
$('.trigger-skinny').on('click', '', this.triggerSkinny);
}
}
}());
})(jQuery);
;(function($) {
window.Digicon.Rotator = window.ProjectName.SomeModule || window.ProjectName.Module(function() {
var _queries = [
{
context: 'mobile',
callback: Digicon.Rotator.triggerMobile
},
{
context: 'skinny',
callback: Digicon.Rotator.triggerSkinny
}
];
return {
init: function() {
MQ.init(_queries);
},
triggerMobile: function() {
$el.on('click', '.some-action', this.events.someAction);
},
triggerSkinny: function() {
$el.on('click', '.some-action', this.events.someAction);
},
attachEvents: function() {
$('.trigger-mobile').on('click', '', this.triggerMobile);
$('.trigger-skinny').on('click', '', this.triggerSkinny);
}
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment