JSFiddle

  • testing OOP alert #1 is the latest revision

    testing out an OOP Alert box that I will be able to reuse throughout the site

    function CustomAlert(){
    		this.render = function(dialog){
    			console.log("render line 173");
    			var winW = window.innerWidth;
    			var winH = window.innerHeight;
    			var ...
  • parallax fun #6 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    
    
    	function yHandler(){
    		var wrap = document.getElementById('wrap');
    		var contentHeight = wrap.offsetHeight;//get content height
    		//console.log(contentHeight);
    		var yOffset = window ...
  • Ajax load on scroll #6 is the latest revision

    experimenting with a load more when the user scrolls

    function yHandler(){
    		var wrap = document.getElementById('wrap');
    		var contentHeight = wrap.offsetHeight;//get content height
    		//console.log(contentHeight);
    		var yOffset = window ...
  • OUI Bounce #8 is the latest revision

    bounding a form from one spot on a page to another and eventually with scroll spy

    jQuery(document).ready(function() {
    $("#slider-close").click(function(){
        $("#slide-lead-modal").removeClass("show slide_open").addClass("close");
            var a = $(".prod-content.hero .mailchimp_form_container"),
                b = $("#slide-lead-form-wrapper ...
  • OE-newbutton #3 is the latest revision

    test new button function

    
    
    <body>
    
        <!-- Fixed navbar -->
        <nav class="navbar navbar-inverse navbar-fixed-top">
            <div class="container">
                <div class="container navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="/openenglish/"></a>
                    <a class="lpbtn pull-right hidden-xs" href="https://learningplatform.openenglish.com/">Entrar</a>
                    <div id="navContactContainer" class="pull-right">
                        <label id="navContactText" class=" ">
                        </label>
                        <div class="styled-select">
    
                            <div id="login-form-container" class="login-form dropdown">
                                <span class="select-area dropdown-toggle" id="#dropdown-toggle" style="width: 160px;" data-toggle="dropdown">
                 <span class="left"></span>
                                <span class="center" name="phone_holder" id="phone_holder">+1-877-500-4645</span>
                                <a class="select-opener login"></a>
                                </span>
                                <ul class="dropdown-menu" id="phone_list" role="menu" aria-labelledby="dLabel1">
                                    <li role="presentation"><a class="phone" role="menuitem" id="Argentina" data-phone="0800-800-6736" tabindex="-1" href="javascript:void(0)">Argentina</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="Bolivia" data-phone="800-100-930" tabindex="-1" href="javascript:void(0)">Bolivia</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="Brasil" data-phone="(0800) 887-1474" tabindex="-1" href="javascript:void(0)">Brasil</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="Chile" data-phone="(2) 2585-6975" tabindex="-1" href="javascript:void(0)">Chile</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="Colombia" data-phone="(1) 329 5200" tabindex="-1" href="javascript:void(0)">Colombia</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="CostaRica" data-phone="4000-1982" tabindex="-1" href="javascript:void(0)">Costa Rica</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="Ecuador" data-phone="+1-888-693-0169" tabindex="-1" href="javascript:void(0)">Ecuador</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="ElSalvador" data-phone="2113-3532" tabindex="-1" href="javascript:void(0)">El Salvador</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="España" data-phone="900-981-696" tabindex="-1" href="javascript:void(0)">España</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="EstadosUnidosdeAmérica" data-phone="1-877-500-4645" tabindex="-1" href="javascript:void(0)">Estados Unidos de América</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="Guatemala" data-phone="2378-4833" tabindex="-1" href="javascript:void(0)">Guatemala</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="Honduras" data-phone="1-888-693-0169" tabindex="-1" href="javascript:void(0)">Honduras</a></li>
                                    <li role="presentation"><a class="phone" role="menuitem" id="México" data-phone="01800 6818042" tabindex="-1" href="javascript:void(0)">México ...</a></li></ul></div></div></div></div></div></nav></!--></body>
  • set and get cookie

    Mootools 1.4.5, HTML, CSS, JavaScript

    <script type="text/javascript">
    
    function lpCheck(){
    	
      var lpCookie = getCookie("LP2");
    		alert(lpCookie);
        
        if (lpCookie == null || lpCookie == "") {
            alert("no cookie found");
        }
        else {
            alert("LP cookie ...</script>
  • Custom field to dropdown #4 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    var cDrop = function(el){
      var parentTarget = document.getElementById(el);
      if(!parentTarget){
        alert("No such element with id!");
    	return false;
      }
      var ...