index.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <!DOCTYPE html>
  2. <!--[if IE 9]><html class="no-js ie9"><![endif]-->
  3. <!--[if gt IE 9]><!--><html class="no-js"><!--<![endif]-->
  4. <head>
  5. <meta charset="UTF-8" />
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>Flexible Calendar</title>
  9. <meta name="description" content="Flexible Calendar with jQuery and CSS3" />
  10. <meta name="keywords" content="responsive, calendar, jquery, plugin, full page, flexible, javascript, css3, media queries" />
  11. <meta name="author" content="Codrops" />
  12. <link rel="shortcut icon" href="../favicon.ico">
  13. <link rel="stylesheet" type="text/css" href="css/calendar.css" />
  14. <link rel="stylesheet" type="text/css" href="css/custom_1.css" />
  15. <script src="js/modernizr.custom.63321.js"></script>
  16. </head>
  17. <body>
  18. <div class="container">
  19. <!-- Codrops top bar -->
  20. <div class="codrops-top clearfix">
  21. <a href="http://tympanus.net/Development/Stapel/"><strong>&laquo; Previous Demo: </strong>Adaptive Thumbnail Pile Effect</a>
  22. <span class="right">
  23. <a href="http://tympanus.net/codrops/?p=12416"><strong>Back to the Codrops Article</strong></a>
  24. </span>
  25. </div><!--/ Codrops top bar -->
  26. <div class="custom-calendar-wrap custom-calendar-full">
  27. <div class="custom-header clearfix">
  28. <h2>Flexible Calendar <span><span>Demo 1</span> | <a href="index2.html">Demo 2</a></span></h2>
  29. <h3 class="custom-month-year">
  30. <span id="custom-month" class="custom-month"></span>
  31. <span id="custom-year" class="custom-year"></span>
  32. <nav>
  33. <span id="custom-prev" class="custom-prev"></span>
  34. <span id="custom-next" class="custom-next"></span>
  35. <span id="custom-current" class="custom-current" title="Got to current date"></span>
  36. </nav>
  37. </h3>
  38. </div>
  39. <div id="calendar" class="fc-calendar-container"></div>
  40. </div>
  41. </div><!-- /container -->
  42. <script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
  43. <script type="text/javascript" src="js/jquery.calendario.js"></script>
  44. <script type="text/javascript" src="js/data.js"></script>
  45. <script type="text/javascript">
  46. $(function() {
  47. var cal = $( '#calendar' ).calendario( {
  48. onDayClick : function( $el, $contentEl, dateProperties ) {
  49. for( var key in dateProperties ) {
  50. console.log( key + ' = ' + dateProperties[ key ] );
  51. }
  52. },
  53. caldata : codropsEvents
  54. } ),
  55. $month = $( '#custom-month' ).html( cal.getMonthName() ),
  56. $year = $( '#custom-year' ).html( cal.getYear() );
  57. $( '#custom-next' ).on( 'click', function() {
  58. cal.gotoNextMonth( updateMonthYear );
  59. } );
  60. $( '#custom-prev' ).on( 'click', function() {
  61. cal.gotoPreviousMonth( updateMonthYear );
  62. } );
  63. $( '#custom-current' ).on( 'click', function() {
  64. cal.gotoNow( updateMonthYear );
  65. } );
  66. function updateMonthYear() {
  67. $month.html( cal.getMonthName() );
  68. $year.html( cal.getYear() );
  69. }
  70. // you can also add more data later on. As an example:
  71. /*
  72. someElement.on( 'click', function() {
  73. cal.setData( {
  74. '03-01-2013' : '<a href="#">testing</a>',
  75. '03-10-2013' : '<a href="#">testing</a>',
  76. '03-12-2013' : '<a href="#">testing</a>'
  77. } );
  78. // goes to a specific month/year
  79. cal.goto( 3, 2013, updateMonthYear );
  80. } );
  81. */
  82. });
  83. </script>
  84. </body>
  85. </html>