Custom.js - July 2014
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 - 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);
Developer | Hamiltopia |
Username | hamiltopia |
Uploaded | November 17, 2022 |
Rating | 3 |
Size | 3,865 Kb |
Views | 10,120 |
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!
Name | Size |
Panorama v2 | 3,798 Kb |
Simple Drupal Stuffs | 3,727 Kb |
Masterpiece v2 | 10,686 Kb |
Page Piling | 3,667 Kb |
Pagination JS File | 5,794 Kb |
Node--article--teaser.tpl.php | 2,410 Kb |
JScroll WHeel | 3,288 Kb |
Navigation | 3,227 Kb |
Stupid Simple Accordian | 3,051 Kb |
Testing the Affix and Scrollspy | 2,989 Kb |
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!
Name | Username | Size |
Filter inputs | Rowinf | 1,721 Kb |
Find The Penguin | Lelder | 2,212 Kb |
A Pen by Tosh | Panev | 2,586 Kb |
VerbalExpressions Converter | Cmalven | 2,607 Kb |
JavaScript constructors | Simboonlong | 2,415 Kb |
Velocity.js custom stagger | Tommiehansen | 4,805 Kb |
Automatic scroll | Skeurentjes | 4,042 Kb |
Popup Modal | Aldlevine | 3,696 Kb |
DFF Website | Hawcubite | 10,123 Kb |
Animated Vertical CSS3 Menu Black | MaCeLMp4 | 2,750 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!