Javascript – Macaroom


4.1. Javascrpt library and files

All javascripts are placed in folder /js. In main.js file we implement all functions calls.
This theme uses following Javascript files:

  1.  Bootstrap v 3 framework (powerful front-end framework for faster and easier web development)
  2. jQuery v1.10.2 (A fast javascript library that Foodtruckifies how to traverse HTML documents, handle events, perform animations.)
  3. jQuery FlexSlider v2.2.0
  4. GMAP3 Plugin for JQuery v. 5.1.1
  5. jQuery.appear
  6. jQuery Stellar
  7. jQuery tweet
  8. Modernizr 2.0.6
  9. PageScroller
  10. final-countdown.js
  11. snap.js
  12. device.js 0.1.58
  13. chart.js

4.2. Google Map (GMAP3 Plugin)

This is google map with custom marker, you can define couple parameters:

  1. data-location – address to show
  2. data-height – map height (if undefined height will be 220px)
  3. data-offset – by how many map should be repositioned from marker center point (default -30)

It uses gmap3 plugin. Documentation: here
HTML Markup:

All javascript code can be found in js/main.js file.

 

Content / Images Slider.
Each parameter can be defined as data attribute :

  • data-namespace
  • data-selector
  • data-animation
  • data-easing
  • data-direction
  • data-reverse
  • data-animationloop
  • data-smoothheight
  • data-startat
  • data-slideshow
  • data-slideshowspeed
  • data-animationspeed
  • data-initdelay
  • data-randomize
  • data-thumbcaptions
  • data-pauseonaction
  • data-pauseonhover
  • data-pauseinvisible
  • data-usecss
  • data-touch
  • data-video
  • data-controlnav
  • data-directionnav
  • data-prevtext
  • data-nexttext
  • data-keyboard
  • data-multiplekeyboard
  • data-mousewheel
  • data-pauseplay
  • data-pausetext
  • data-playtext
  • data-itemwidth
  • data-itemmargin
  • data-minitems
  • data-maxitems
  • data-move
  • data-allowoneslide
  • data-controlscontainer
  • data-manualcontrols
  • data-sync
  • data-asnavfor

Read the documentation here: Flexslider Documentation

And js initialization (js/main.js file), there you can change slider parameters:

4.4. Jquery.appear

This plugin call function when element appear in viewport. This is used in custom animation, progress bars, counter timer.
Documentation: https://github.com/bas2k/jquery.appear/

4.5. Charts

This plugin is used to make graphics. Documentation: http://www.chartjs.org/