Skip to content

Commit

Permalink
Removed splash screen and initial fade.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsamuels committed Feb 6, 2014
1 parent 66832d4 commit cd9b2ac
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 77 deletions.
136 changes: 68 additions & 68 deletions assets/themes/twitter-mod/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var mobileMenuClone = $('#menu').clone().attr('id', 'navigation-mobile');

CHAKRA.mobileNav = function(){
var windowWidth = $(window).width();

// Show Menu or Hide the Menu
if( windowWidth <= 979 ) {
if( $('#mobile-nav').length > 0 ) {
Expand All @@ -20,21 +20,21 @@ CHAKRA.mobileNav = function(){
} else {
$('#navigation-mobile').css('display', 'none');
if ($('#mobile-nav').hasClass('open')) {
$('#mobile-nav').removeClass('open');
$('#mobile-nav').removeClass('open');
}
}
}

// Call the Event for Menu
// Call the Event for Menu
CHAKRA.listenerMenu = function(){
$('#mobile-nav').on('click', function(e){
$(this).toggleClass('open');

$('#navigation-mobile').stop().slideToggle(350, 'easeOutExpo');

e.preventDefault();
});

$('#menu-nav-mobile a').on('click', function(){
$('#mobile-nav').removeClass('open');
$('#navigation-mobile').slideUp(350, 'easeOutExpo');
Expand Down Expand Up @@ -62,31 +62,31 @@ CHAKRA.slider = function(){
keyboard_nav : 1, // Keyboard navigation on/off
performance : 1, // 0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit)
image_protect : 1, // Disables image dragging and right click with Javascript
// Size & Position

// Size & Position
min_width : 0, // Min width allowed (in pixels)
min_height : 0, // Min height allowed (in pixels)
vertical_center : 1, // Vertically center background
horizontal_center : 1, // Horizontally center background
fit_always : 0, // Image will never exceed browser width or height (Ignores min. dimensions)
fit_portrait : 1, // Portrait images will not exceed browser height
fit_landscape : 0, // Landscape images will not exceed browser width
// Components

// Components
slide_links : 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank')
thumb_links : 0, // Individual thumb links for each slide
thumbnail_navigation : 0, // Thumbnail navigation
slides : [ // Slideshow Images
{image : '_include/img/slider-images/image01.jpg', title : '<div class="slide-content">Chakra</div>', thumb : '', url : ''},
{image : '_include/img/slider-images/image02.jpg', title : '<div class="slide-content">Responsive Design</div>', thumb : '', url : ''},
{image : '_include/img/slider-images/image03.jpg', title : '<div class="slide-content">FullScreen Gallery</div>', thumb : '', url : ''},
{image : '_include/img/slider-images/image04.jpg', title : '<div class="slide-content">Showcase Your Work</div>', thumb : '', url : ''}
{image : '_include/img/slider-images/image04.jpg', title : '<div class="slide-content">Showcase Your Work</div>', thumb : '', url : ''}
],
// Theme Options
progress_bar : 0, // Timer for each slide

// Theme Options
progress_bar : 0, // Timer for each slide
mouse_scrub : 0

});

}
Expand All @@ -106,9 +106,9 @@ CHAKRA.nav = function(){
================================================== */

CHAKRA.filter = function (){
if($('#projects').length > 0){
if($('#projects').length > 0){
var $container = $('#projects');

$container.imagesLoaded(function() {
$container.isotope({
// options
Expand All @@ -117,12 +117,12 @@ CHAKRA.filter = function (){
layoutMode : 'fitRows'
});
});


// filter items when filter link is clicked
var $optionSets = $('#options .option-set'),
$optionLinks = $optionSets.find('a');

$optionLinks.click(function(){
var $this = $(this);
// don't proceed if already selected
Expand All @@ -132,7 +132,7 @@ CHAKRA.filter = function (){
var $optionSet = $this.parents('.option-set');
$optionSet.find('.selected').removeClass('selected');
$this.addClass('selected');

// make option object dynamically, i.e. { filter: '.my-filter-class' }
var options = {},
key = $optionSet.attr('data-option-key'),
Expand All @@ -147,7 +147,7 @@ CHAKRA.filter = function (){
// otherwise, apply new options
$container.isotope( options );
}

return false;
});
}
Expand All @@ -160,8 +160,8 @@ CHAKRA.filter = function (){

CHAKRA.fancyBox = function(){
if($('.fancybox').length > 0 || $('.fancybox-media').length > 0 || $('.fancybox-various').length > 0){
$(".fancybox").fancybox({

$(".fancybox").fancybox({
padding : 0,
beforeShow: function () {
this.title = $(this.element).attr('title');
Expand All @@ -171,15 +171,15 @@ CHAKRA.fancyBox = function(){
title : { type: 'inside' },
}
});

$('.fancybox-media').fancybox({
openEffect : 'none',
closeEffect : 'none',
helpers : {
media : {}
}
});

$(".fancybox-various").fancybox({
maxWidth : 800,
maxHeight : 600,
Expand All @@ -202,21 +202,21 @@ CHAKRA.fancyBox = function(){
CHAKRA.contactForm = function(){
$("#contact-submit").on('click',function() {
$contact_form = $('#contact-form');

var fields = $contact_form.serialize();

$.ajax({
type: "POST",
url: "_include/php/contact.php",
data: fields,
dataType: 'json',
success: function(response) {

if(response.status){
$('#contact-form input').val('');
$('#contact-form textarea').val('');
}

$('#response').empty().html(response.html);
}
});
Expand All @@ -231,7 +231,7 @@ CHAKRA.contactForm = function(){

CHAKRA.tweetFeed = function(){
var valueTop = -64; // Margin Top Value

$("#ticker").tweet({
username: "Bluxart", // Change this with YOUR ID
page: 1,
Expand All @@ -246,13 +246,13 @@ CHAKRA.tweetFeed = function(){
setTimeout(function() {
ul.find('li:first').animate( {marginTop: valueTop + 'px'}, 500, 'linear', function() {
$(this).detach().appendTo(ul).removeAttr('style');
});
});
ticker();
}, 5000);
};
ticker();
});

}


Expand All @@ -279,7 +279,7 @@ CHAKRA.menu = function(){
CHAKRA.goSection = function(){
$('#nextsection').on('click', function(){
$target = $($(this).attr('href')).offset().top-30;

$('body, html').animate({scrollTop : $target}, 750, 'easeOutExpo');
return false;
});
Expand All @@ -292,7 +292,7 @@ CHAKRA.goSection = function(){
CHAKRA.goUp = function(){
$('#goUp').on('click', function(){
$target = $($(this).attr('href')).offset().top-30;

$('body, html').animate({scrollTop : $target}, 750, 'easeOutExpo');
return false;
});
Expand Down Expand Up @@ -337,12 +337,12 @@ CHAKRA.scrollToTop = function(){

// Fix Hover on Touch Devices
CHAKRA.utils = function(){

$('.item-thumbs').bind('touchstart', function(){
$(".active").removeClass("active");
$(this).addClass('active');
});

}

/* ==================================================
Expand All @@ -351,15 +351,15 @@ CHAKRA.utils = function(){

CHAKRA.accordion = function(){
var accordion_trigger = $('.accordion-heading.accordionize');

accordion_trigger.delegate('.accordion-toggle','click', function(event){
if($(this).hasClass('active')){
$(this).removeClass('active');
$(this).addClass('inactive');
}
else{
accordion_trigger.find('.active').addClass('inactive');
accordion_trigger.find('.active').removeClass('active');
accordion_trigger.find('.active').addClass('inactive');
accordion_trigger.find('.active').removeClass('active');
$(this).removeClass('inactive');
$(this).addClass('active');
}
Expand All @@ -373,7 +373,7 @@ CHAKRA.accordion = function(){

CHAKRA.toggle = function(){
var accordion_trigger_toggle = $('.accordion-heading.togglize');

accordion_trigger_toggle.delegate('.accordion-toggle','click', function(event){
if($(this).hasClass('active')){
$(this).removeClass('active');
Expand All @@ -391,7 +391,7 @@ CHAKRA.toggle = function(){
Tooltip
================================================== */

CHAKRA.toolTip = function(){
CHAKRA.toolTip = function(){
$('a[data-toggle=tooltip]').tooltip();
}

Expand All @@ -411,22 +411,22 @@ CHAKRA.map = function(){
$map_lon = $map.attr('data-mapLon');
$map_zoom = parseInt($map.attr('data-mapZoom'));
$map_title = $map.attr('data-mapTitle');
var latlng = new google.maps.LatLng($map_lat, $map_lon);
var options = {



var latlng = new google.maps.LatLng($map_lat, $map_lon);
var options = {
scrollwheel: false,
draggable: false,
draggable: false,
zoomControl: false,
disableDoubleClickZoom: false,
disableDefaultUI: true,
zoom: $map_zoom,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var styles = [

var styles = [
{
stylers: [
{ hue: "#2F3238" },
Expand All @@ -447,34 +447,34 @@ CHAKRA.map = function(){
]
}
];

var styledMap = new google.maps.StyledMapType(styles,{name: "Styled Map"});

var map = new google.maps.Map(document.getElementById($map_id), options);

var image = '_include/img/marker.png';
var marker = new google.maps.Marker({
position: latlng,
map: map,
title: $map_title,
icon: image
});

map.mapTypes.set('map_style', styledMap);
map.setMapTypeId('map_style');

var contentString = '<p><strong>Company Name</strong><br>Address here</p>';

var infowindow = new google.maps.InfoWindow({
content: contentString
});

google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});

});
}
}
}

/* ==================================================
Expand All @@ -488,28 +488,28 @@ $(document).ready(function(){
Modernizr.load([
{
test: Modernizr.placeholder,
nope: '_include/js/placeholder.js',
nope: '_include/js/placeholder.js',
complete : function() {
if (!Modernizr.placeholder) {
Placeholders.init({
live: true,
hideOnFocus: false,
className: "yourClass",
textColor: "#999"
});
});
}
}
}
]);

// Preload the page with jPreLoader
$('body').jpreLoader({
splashID: "#jSplash",
showSplash: true,
showPercentage: true,
autoClose: true
});
// $('body').jpreLoader({
// splashID: "#jSplash",
// showSplash: true,
// showPercentage: true,
// autoClose: true
// });

CHAKRA.nav();
CHAKRA.mobileNav();
CHAKRA.listenerMenu();
Expand Down
Loading

0 comments on commit cd9b2ac

Please sign in to comment.