반응형
반응형

[javascript] 현재 경로를 찾아서 어느 위치인지 인식한다.

 

 

   //-- 현재 url 호출
    var now_path_nm = location.pathname;

 

  //-- 현재 url에 찾고 있는 문자가 있으면 -1 보다 큰 숫자 리턴
    var result = now_path_nm.indexOf("s");

반응형
반응형

[javascript] URL get path info , Query String



window.location.pathname + window.location.search



location.pathname+location.search








반응형
반응형
 datediff 구현

 

 


    function getDateDiff(date1,date2){
        var arrDate1 = date1.split("-");
        var getDate1 = new Date(parseInt(arrDate1[0]),parseInt(arrDate1[1])-1,parseInt(arrDate1[2]));
        var arrDate2 = date2.split("-");
        var getDate2 = new Date(parseInt(arrDate2[0]),parseInt(arrDate2[1])-1,parseInt(arrDate2[2]));

        var getDiffTime = getDate1.getTime() - getDate2.getTime();

        return Math.floor(getDiffTime / (1000 * 60 * 60 * 24));
    }

 

 

getDateDiff("2016-08-01","2016-07-21")

 

 

 

반응형
반응형

Howler.js is an audio library for the modern web. It makes working with audio in JavaScript easy and reliable across all platforms.

howler.js

 

Description

howler.js is an audio library for the modern web. It defaults to Web Audio API and falls back to HTML5 Audio. This makes working with audio in JavaScript easy and reliable across all platforms.

Additional information, live demos and a user showcase are available at howlerjs.com.

Features

  • Single API for all audio needs
  • Defaults to Web Audio API and falls back to HTML5 Audio
  • Handles edge cases and bugs across environments
  • Supports all codecs for full cross-browser support
  • Automatic caching for improved performance
  • Control sounds individually, in groups or globally
  • Playback of multiple sounds at once
  • Easy sound sprite definition and playback
  • Full control for fading, rate, seek, volume, etc.
  • Easily add 3D spatial sound or stereo panning
  • Modular - use what you want and easy to extend
  • No outside dependencies, just pure JavaScript
  • As light as 7kb gzipped

Browser Compatibility

Tested in the following browsers/versions:

  • Google Chrome 7.0+
  • Internet Explorer 9.0+
  • Firefox 4.0+
  • Safari 5.1.4+
  • Mobile Safari 6.0+ (after user input)
  • Opera 12.0+
  • Microsoft Edge

Live Demos

 

 

 

 

.

반응형
반응형

DerbyJS: A full-stack framework for modern web apps

 

DerbyJS is a full-stack framework built for creating modern web applications. It’s composed of several standard node.js modules so you can mix and match your own code, community modules, and DerbyJS functions.

derbyjs

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

반응형
반응형

Glio.js: Easily trigger callbacks

 

 

Glio.js lets you easily tigger callbacks when it detects that your visitor’s mouse has left the browser viewport. It can help increase your conversion rates by giving visitors a reason to stick around.

glio.js

 

 

 

반응형

+ Recent posts