Custom.js - July 2014

Developer
Size
3,865 Kb
Views
10,120

How do I make an custom.js - july 2014?

Custom javascript for my Drupal sitesZen Theme. What is a custom.js - july 2014? How do you make a custom.js - july 2014? This script and codes were developed by Hamiltopia on 17 November 2022, Thursday.

Custom.js - July 2014 Previews

Custom.js - July 2014 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Custom.js - July 2014</title>
</head>
<body> <!-- Custom.js - May 2013 --> <script src="js/index.js"></script>
</body>
</html>

Custom.js - July 2014 - Script Codes JS Codes

/** * @file * A JavaScript file for the theme. * * In order for this JavaScript to be loaded on pages, see the instructions in * the README.txt next to this file. */
// JavaScript should be made compatible with libraries other than jQuery by
// wrapping it with an "anonymous closure". See:
// - https://drupal.org/node/1446420
// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
(function ($, Drupal, window, document, undefined) {
// To understand behaviors, see https://drupal.org/node/756722#behaviors
Drupal.behaviors.my_custom_behavior = { attach: function(context, settings) {	//BG Image	//var images = ['bg1.jpg', 'bg2.jpg', 'bg3.jpg', 'bg4.jpg', 'bg5.jpg', 'bg7.jpg'];	//$('body').css({'background-image': 'url(http://www.hamiltopia.com/sites/all/themes/daigoro/images/' + images[Math.floor(Math.random() * images.length)] + ')'});	//Vieew Rollovers	$(".drawer").hide();	$(".handle").hover( function() { $(this).next('.drawer').slideUp(); $(this).addClass('hover'); }, function(){ $(this).next('.drawer').slideDown(); $(this).removeClass('hover'); }	);	$(".view-main-content").hover(function(){	$(".view-main-content .views-slideshow-controls-text-previous a").fadeIn();	$(".view-main-content .views-slideshow-controls-text-next a").fadeIn();	}, function(){	$(".view-main-content .views-slideshow-controls-text-previous a").fadeOut();	$(".view-main-content .views-slideshow-controls-text-next a").fadeOut();	});	// WYSIWYG Images	/* $(document).find('img').each( function() { var align = $(this).css('float'); var s = this.alt.indexOf('['); var e = this.alt.lastIndexOf(']'); if(s > -1 && e > s) { var caption = this.alt.substring(++s, e); } if(align == 'left' || align == 'right' || caption) { $(this).load(function() { $(this).css('float', 'none').wrap('<div class="picture"></div>').parent().addClass('picture-' + align).width(this.width); if(caption) { $(this).after('<em class="caption"></em>').next().html(caption).parent().addClass('with-caption'); } }); } } ); */ // $(".sidebar").sticky({topSpacing:0}); //Masonry	//	var $container = $('.view-taxonomy-term');	//	$container.imagesLoaded( function(){	// $container.masonry({	// itemSelector : '.views-row'	// });	//	});	// $('.view-taxonomy-term').masonry({	// itemSelector: '.views-row'	// }); //Fade in on page scroll	// var targets = $("#block-block-3"); if($(window).scrollTop() > 10){ targets.hide(); } $(window).scroll(function(){ var pos = $(window).scrollTop(); if(pos > 400){ targets.stop(true, true).fadeTo("slow", 1); } else { targets.stop(true, true).fadeTo("slow", 0); } }); //Slide Header on page scroll	$(window).scroll(function () { if ($(window).scrollTop() > 400) { $(".front #header").slideDown(); } if ($(window).scrollTop() < 300) { $(".front #header").slideUp(); }	}); // height maych width //var cw = $('.front #content .block-block').width();	//$('.front #content .block-block').css({'height':cw+'px'}); //var cw = $('.front #content .block-views').width();	//$('.front #content .block-views').css({'height':cw+'px'});	//ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)	$('.node-title').click(function() {	//REMOVE THE ON CLASS FROM ALL BUTTONS	$('.node-title').removeClass('on');	//NO MATTER WHAT WE CLOSE ALL OPEN SLIDES	$('.group_drawer').slideUp('normal');	//IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT	if($(this).next().is(':hidden') == true) {	//ADD THE ON CLASS TO THE BUTTON	$(this).addClass('on');	//OPEN THE SLIDE	$(this).next().slideDown('normal'); } });	/*** REMOVE IF MOUSEOVER IS NOT REQUIRED ***/	//ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER	$('.node-title').mouseover(function() {	$(this).addClass('over');	//ON MOUSEOUT REMOVE THE OVER CLASS	}).mouseout(function() {	$(this).removeClass('over');	});	/*** END REMOVE IF MOUSEOVER IS NOT REQUIRED ***/	/********************************************************************************************************************	CLOSES ALL S ON PAGE LOAD	********************************************************************************************************************/	$('.group_drawer').hide();	//var $container = $('.view-taxonomy-term');	//$container.imagesLoaded( function(){	//	$container.masonry({ // itemSelector : '.views-row' // });	//}); $('.view .node-title a').hover(function(){ $('strong',this).stop(true,true).animate({bottom:'.8em'},200); },function(){ $('strong',this).stop(true,true).animate({bottom:'.5em'},400); });	//hover on homepage	//$('.view-main-content .node-title').hide();	//$('.view-main-content .views-row').hover(function() { // $('.node-title',this).fadeIn("fast"); //}, function(){ // $('.node-title',this).fadeOut("fast"); // }	//); //$('.view-taxonomy-term').isotope({ // options // itemSelector : '.views-row', // layoutMode : 'masonryHorizontal'	//});	//Resize element to viewport size $(document).ready(function(){	resizeDiv();	});	window.onresize = function(event) {	resizeDiv();	}	function resizeDiv() {	vpw = $(window).width();	vph = $(window).height();	$('#bigboi').css({'height': vph + 'px'});	}	//Add Class "ihasmobile" to Body if window size is lower than 969 pixels	function checkmobile() { if ( $(window).width() < 959 ) { $('body').addClass('ihasmobile'); } else { $('body').removeClass('ihasmobile'); }	}	$(window).load(checkmobile);	$(window).resize(checkmobile);	//Add Class "ihaswide" to Body if window size is higher than 960 pixels	function checkwide() { if ( $(window).width() > 960 ) { $('body').addClass('ihaswide'); } else { $('body').removeClass('ihaswide'); }	}	$(window).load(checkwide);	$(window).resize(checkwide); }
};	//Animation trigger for the series-title	//Add a class once the element is in view	$(window).on('load resize scroll',function(e){	$('.section-title').each(function(index) {	var h2Height = parseInt($(this)[0].getBoundingClientRect().height);	var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);	// This will return true as soon as the heading crosses the bottom of the viewport	if ($(this)[0].getBoundingClientRect().top < (viewHeight - h2Height)) {	$('.section-title').eq(index).addClass('viewable');	}	});
})(jQuery, Drupal, this, this.document);
Custom.js - July 2014 - Script Codes
Custom.js - July 2014 - Script Codes
Home Page Home
Developer Hamiltopia
Username hamiltopia
Uploaded November 17, 2022
Rating 3
Size 3,865 Kb
Views 10,120
Do you need developer help for Custom.js - July 2014?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Hamiltopia (hamiltopia) Script Codes
Create amazing sales emails with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!