JSFiddle

  • alert test

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

    function send(alertId, xst, cst, accountId, delay) {
    	setTimeout(function() {
    		$.ajax({
            url: 'https://demo-api.ig.com/nwtpdeal/alert/' + alertId,
            type: 'DELETE ...
  • French flag

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

    <div class="test"></div>
  • flex test

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

    <div class="container">
      <div class="title-container">
        <span class="market-name">market name lorem hghjg jhgjhg jghg jjhgjhg </span>
        <span class="period">DEC 16</span>
      </div>
      <button class="toggle">-</button>
    </div>
  • Scrollbar width

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

    function getScrollbarWidth() {
      var inner = document.createElement('p'),
        outer = document.createElement('div');
    
      outer.className = 'scroll-test-container';
      outer.appendChild(inner);
      
      document.body.appendChild ...
  • Close btn

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

    var closeButtons = document.querySelectorAll('#positions .close');
    
    closeButtons.forEach(function(closeButton) {
      closeButton.addEventListener('click', handleClosePosition, false);
    });
    
    function handleClosePosition(element) {
    	alert('deal ...
  • module

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

    // index.html
    // Here we setup a namespace called PROJ, all of our methods for the app will be featured under ...
  • Time with timezone offset #8 is the latest revision

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

    var date = new Date(), // Your machines time zone
    	utc = date.getTime() + (date.getTimezoneOffset() * 60000),
    	utcOffset = 0, // 1 = BST, 2 = CEST ...
  • Hiding content without javascript

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

    <div id="panel-state">
        <h1 id="hide-title">TITLE TO HIDE</h1>
        
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris aliquet eros at pretium tincidunt. Suspendisse potenti. Sed ...</p></div>
  • HTML5 File Upload API #62 is the latest revision

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

    (function(){
    
        function FileUploader(ID){
            this.form = document.getElementById(ID);
            this.uploadTemplate = document.getElementById('uploadFormTemplate');
            this.initialise();
        }
        
        FileUploader.PROGRESS_ANIMATION_DELAY = 3000;
        
        FileUploader ...
  • make add(1)(2)(8) return 11

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

    var add = function(a) {
    
        var sum = a;
    
        var _add = function(b) {
            sum += b;
            return _add;
        }; 
        
        _add.valueOf = function() {
            return sum ...