JSFiddle

  • Same Height

    Set the height of the heightest element with the same class

    (function(){
    
      $(document).on('click','.same-height-btn',function(e){
        e.preventDefault();
        same_height();
      });
    
    
      var same_height = function(){
    
        var max_height;
    
        if ( $('.js-same-height').length > 0 ){
    
          //First ...
  • Getting data-attribute from chosen #4 is the latest revision

    Snippet to get the the value of selected option using chosen and jquery.

    $('select').chosen();
    
    $(document).on('change','#mySelect',function(e){
     var r = $('#mySelect option:selected').data('customF');
     $("#result").html( r );
    });
  • View the password #1 is the latest revision

    Change text-field type, to see user's password while typing.

    
      
       $(document).on('keyup','.js-show-password',function( e ){
        e.preventDefault();
     
    
        if( $('.js-show-password').val() !== "" ){
          $('#show-password-btn').show();
        }else{
          $('#show-password-btn').hide();
        }
    
      });
      
      $(document).on('click','#show-password-btn ...
  • Editable Elements #1 is the latest revision

    Convert any element in an editable area.

        (function(){
    
            /*
              Edit button listener
              1.- Get all elements of its current editable space container, nodes.
              2.- Iterate through all nodes ...
  • jQuery Steps #1 is the latest revision

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

    $(document).ready(function(){
    
      init_step();
      auto_width();
    
      $(window).resize(function(){
        auto_width();
      });
    
      $(document).on('click','.steps-next',function(){
          next_step();
      });
    
      $(document).on('click','.steps-back',function ...
  • Menú estático #1 is the latest revision

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

    var elemento = $("#menu_secundario");
    var tope = elemento.offset().top;
    var alto_menu = $('.navbar-header').outerHeight(true);
    
    
    $(window).scroll(function() {
    
      if ($(document).scrollTop() >= (tope ...