Advertisement
Guest User

Untitled

a guest
Sep 24th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. $(document).ready(function() {
  2. "use strict"
  3.  
  4. // global. currently active menu item
  5. var current_item = 0;
  6.  
  7. // few settings
  8. var section_hide_time = 1000;
  9. var section_show_time = 1000;
  10.  
  11. // Switch section
  12. $("a", '#main-nav').click(function()
  13. {
  14. if( ! $(this).hasClass('active') ) {
  15. current_item = this;
  16. $('.section:visible').fadeOut( section_hide_time, function() {
  17. $('a', '#main-nav').removeClass( 'active' );
  18. $(current_item).addClass( 'active' );
  19. var new_section = $( $(current_item).attr('href') );
  20. new_section.fadeIn( section_show_time );
  21. } );
  22. }
  23. return false;
  24. });
  25.  
  26. });
  27.  
  28. $(window).load(function() {
  29. setTimeout(function(){
  30. var myLatlng = new google.maps.LatLng(1.338387,103.922697);
  31. var mapOptions = {
  32. zoom: 16,
  33. center: myLatlng,
  34. scrollwheel: false
  35. };
  36.  
  37. var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
  38.  
  39. var marker = new google.maps.Marker({
  40. position: myLatlng,
  41. map: map,
  42. title: 'Event 1'
  43. });
  44.  
  45. $('#img-gallery').imagesLoaded(function() {
  46. $('#img-gallery').masonry({
  47. itemSelector : '.item',
  48. columnWidth : '.grid-sizer'
  49. });
  50. });
  51. }, 2000);
  52. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement