-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0639782
commit c4f5745
Showing
23 changed files
with
6,697 additions
and
1,088 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1 @@ | ||
jQuery ($) -> | ||
|
||
#*--------------------------------------------------------# | ||
# Sidr | ||
#*--------------------------------------------------------# | ||
|
||
$('#press').sidr | ||
name: 'sidr' | ||
side: 'right' | ||
|
||
$('.close-sidr').click -> | ||
$.sidr 'close', 'sidr' | ||
|
||
$('a#press').bind "click touchstart", -> | ||
$(@).toggleClass 'open' | ||
|
||
#*--------------------------------------------------------# | ||
# bxslider | ||
#*--------------------------------------------------------# | ||
|
||
$('ul.sldr').bxSlider | ||
speed: 1000 | ||
pause: 10000 | ||
auto: false | ||
touchEnabled: false | ||
pagerCustom: '.feature-pager' | ||
controls: true | ||
nextText: 'Previous' | ||
prevText: 'Next' | ||
|
||
#*--------------------------------------------------------# | ||
# Services | ||
#*--------------------------------------------------------# | ||
|
||
serviceTitle = $('.service-title-hldr') | ||
serviceContent = $('.service-content') | ||
|
||
serviceTitle.hoverIntent -> | ||
$(@).parent().find(serviceContent).slideToggle() | ||
|
||
hello = $('.hello') | ||
|
||
$('.this-is-an-element').each -> | ||
$(@).hide() | ||
jQuery ($) -> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#*--------------------------------------------------------# | ||
# Mobile Menu | ||
#*--------------------------------------------------------# | ||
|
||
module.exports = -> | ||
|
||
bodyEl = document.body | ||
content = document.querySelector( '.content-wrap' ) | ||
openbtn = document.getElementById( 'open-button' ) | ||
closebtn = document.getElementById( 'close-button' ) | ||
isOpen = false | ||
|
||
init = -> | ||
initEvents() | ||
|
||
initEvents = -> | ||
openbtn.addEventListener( 'click', toggleMenu ) | ||
if closebtn | ||
closebtn.addEventListener( 'click', toggleMenu ) | ||
|
||
# content.addEventListener 'click', (event) -> | ||
# target = event.target | ||
# if isOpen and target isnt openbtn | ||
# toggleMenu() | ||
|
||
|
||
toggleMenu = -> | ||
if isOpen | ||
classie.remove( bodyEl, 'show-menu' ) | ||
else | ||
classie.add( bodyEl, 'show-menu' ) | ||
isOpen = !isOpen | ||
|
||
init: init |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#*--------------------------------------------------------# | ||
# jQuery Modal Plugin | ||
#*--------------------------------------------------------# | ||
|
||
$ = jQuery | ||
|
||
settings = | ||
overlay: $('.md-overlay') | ||
trigger: null | ||
modal: null | ||
close: null | ||
|
||
methods = | ||
|
||
init: (options) -> | ||
if options | ||
$.extend settings, options | ||
|
||
settings.trigger.click (event) -> | ||
event.preventDefault() | ||
modal = $(@).attr('data-modal') | ||
modalID = '#' + modal | ||
$(modalID).addClass('md-show') | ||
settings.overlay.addClass 'overlay-it' | ||
|
||
mdClose = (event) -> | ||
event.preventDefault() | ||
settings.overlay.removeClass 'overlay-it' | ||
settings.modal.removeClass 'md-show' | ||
|
||
autoPlay = (id, w, h) -> | ||
src = id.find('iframe').attr 'src' | ||
id.html '<iframe width="' + w + '" height="' + h + '" src="' + src + '?&autoplay=1" frameborder="0"></iframe>' | ||
|
||
settings.close.on 'click', mdClose | ||
settings.overlay.on 'click', mdClose | ||
|
||
|
||
log: (message) -> | ||
try | ||
console.log message | ||
catch e | ||
|
||
|
||
$.fn.modal = (method) -> | ||
if methods[method] | ||
methods[method].apply( @, Array.prototype.slice.call( arguments, 1 )) | ||
else if typeof method == 'object' || !method | ||
methods.init.apply( @, arguments ) | ||
else | ||
$.error( 'Method ' + method + ' does not exist on jQuery.plugin_name' ) |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.