Skip to content

rays123/LocationHash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#LocationHash

Location is a small library for get/set/delete the URL HASH parameters

#Use Example - We have our URL = http://example.com/NewPage#tab=Setting&module=Accounts get hash parameter

    Location.getParam(key); 
    // This will return value of key 
    //Ex 
    var a = Location.getParam("tab"); 
    //a = "Setting";

set hash parameter

    Location.setParam(key, val); 
    // This will return set key/val parameter 
    //Ex 
    Location.setParam("dept","Maths");
    //URL will become http://example.com/NewPage#tab=Setting&module=Accounts&dept=Maths

delete hash parameter

    Location.deleteParam(key); 
    // This will return set key/val parameter 
    //Ex 
    Location.deleteParam("tab");
    Location.deleteParam("module");
    //URL will become http://example.com/NewPage#dept=Maths

#Demo

http://jsbin.com/oxayaf

#CopyRight and License

(c)2012, Narendra Sisodiya [email protected],

Released under MIT License

About

Library for get/set/delete URL Hash Params

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published