Sha256: e5e3c46fa00376a42db2704b4830b247e1f3bb1fcb4458c200cc2345d95a9bc1

Contents?: true

Size: 1.57 KB

Versions: 17

Compression:

Stored size: 1.57 KB

Contents

photos_initCallback = (carousel) ->
  jQuery(".jcarousel-control a").bind "click", ->
    carousel.scroll jQuery.jcarousel.intval(jQuery(this).text())
    false

  jQuery(".jcarousel-scroll select").bind "change", ->
    carousel.options.scroll = jQuery.jcarousel.intval(@options[@selectedIndex].value)
    false

  jQuery(".s-next").bind "click", (e) ->
    e.preventDefault()
    carousel.next()
    false

  jQuery(".s-prev").bind "click", (e)->
    e.preventDefault()
    carousel.prev()
    false

  $("a.trigger").click (e)->
    e.preventDefault()
    index = jQuery(this).attr('href').replace('#', "")
    carousel.scroll jQuery.jcarousel.intval(index)


mycarousel_initCallback = (carousel) ->
  jQuery(".jcarousel-control a").bind "click", ->
    carousel.scroll jQuery.jcarousel.intval(jQuery(this).text())
    false

  jQuery(".jcarousel-scroll select").bind "change", ->
    carousel.options.scroll = jQuery.jcarousel.intval(@options[@selectedIndex].value)
    false

  jQuery(".next-thumbs").bind "click", (e) ->
    e.preventDefault()
    carousel.next()
    false

  jQuery(".prev-thumbs").bind "click", (e) ->
    e.preventDefault()
    carousel.prev()
    false

$ ->

  photos = $("#photos-carousel").jcarousel
    visible: 1
    scroll: 1
    initCallback: photos_initCallback
    # This tells jCarousel NOT to autobuild prev/next buttons
    buttonNextHTML: null
    buttonPrevHTML: null


  $(".mycarousel").jcarousel
    visible: 6
    initCallback: mycarousel_initCallback
    # This tells jCarousel NOT to autobuild prev/next buttons
    buttonNextHTML: null
    buttonPrevHTML: null

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
mix-rails-0.16.0 mix-rails-albums/app/assets/javascripts/albums/show.js.coffee
mix-rails-albums-0.16.0 app/assets/javascripts/albums/show.js.coffee
mix-rails-0.15.0 mix-rails-albums/app/assets/javascripts/albums/show.js.coffee
mix-rails-albums-0.15.0 app/assets/javascripts/albums/show.js.coffee
mix-rails-0.12.2 mix-rails-albums/app/assets/javascripts/albums/show.js.coffee
mix-rails-albums-0.12.2 app/assets/javascripts/albums/show.js.coffee
mix-rails-0.12.1 mix-rails-albums/app/assets/javascripts/albums/show.js.coffee
mix-rails-albums-0.12.1 app/assets/javascripts/albums/show.js.coffee
mix-rails-albums-0.11.0 app/assets/javascripts/albums/show.js.coffee
mix-rails-0.10.4 mix-rails-albums/app/assets/javascripts/albums/show.js.coffee
mix-rails-albums-0.10.4 app/assets/javascripts/albums/show.js.coffee
mix-rails-0.10.3 mix-rails-albums/app/assets/javascripts/albums/show.js.coffee
mix-rails-albums-0.10.3 app/assets/javascripts/albums/show.js.coffee
mix-rails-albums-0.10.2 app/assets/javascripts/albums/show.js.coffee
mix-rails-0.7.0 albums/app/assets/javascripts/albums/show.js.coffee
mix-rails-0.6.0 albums/app/assets/javascripts/albums/show.js.coffee
mix-rails-0.5.0 albums/app/assets/javascripts/albums/show.js.coffee