JSFiddle - React, Tailwind, and code Playground

by fparent

JavaScript

/************************************************************************************
* Uranium ☢ Interactive
* http://www.uraniuminteractive.com
*
* SMAT - site Web v2.0
* February 2013
* by Melissa Doyon
*************************************************************************************/

var UI_SMAT = (function ($, window, document, undefined) {
    'use strict';

    var lang = $('html').attr('lang');

    // Facebook SDK initialization
    // Name the IIFE in case we need to reinitialize later
    (function initFacebook(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/fr_CA/all.js#xfbml=1";
        fjs.parentNode.insertBefore(js, fjs);
    } (document, 'script', 'facebook-jssdk'));

    
    // Open Twitter button in popup window
    $('.tw-share').on('click', function (e) {
        var width = 575;
        var height = 400;
        var left = ($(window).width() - width) / 2;
        var top = ($(window).height() - height) / 2;
        var url = this.href;
        var opts = 'status=1' +
                     ',width=' + width +
                     ',height=' + height +
                     ',top=' + top +
                     ',left=' + left;

        window.open(url, 'twitter', opts);

        return false;
    });


    
    function initPage() {
        $(function () {
            // Transform the form's inputs with Uniform to style them 
            initForm();

            // Initialize the tooltips with qTip
            initTooltip();

            // Make sure the custom validation is active for the form
            validatePage( getValidationOptions() );
        });
    }

    //Toggle
    function initToggle() {

        $('.toggle-list-link').on('click', function (e) {

            e.preventDefault();

            var $this = $(this); //<a>
            var $parent = $this.parent(); //<li>
            var...