mmikowski / urianchor Goto Github PK
View Code? Open in Web Editor NEWjQuery plugin to manage the uri hash component. Used for SinglePageWebApps.
jQuery plugin to manage the uri hash component. Used for SinglePageWebApps.
Is it possible to update some but not all of the key/values via setAnchor? For example if I have a fragment like so:
#!page=profile&subpage=one&subsubpage=two
and I only want to change the the "subpage" value. I see that if I use setAnchor like so:
$.uriAnchor.setAnchor({
subpage : 'three'
});
The hash is updated to this:
#!subpage=three
I realize I could capture the existing key values via makeAnchor and then insert them into setAnchor but that's a lot of argument management which I hope to avoid.
There is a syntax error in the following code from
README.md, in the line beginning "online":
$uriAnchor.configModule({
schema_map : {
page : { profile : true, pdf : true },
_page : {
uname : true,
online : { 'today','yesterday','earlier' }
},
slider : { confirm : 'deny' },
_slider : { text : 'goodbye' },
color : { red : true, green : true, blue : true }
}
});
Hi @mmikowski
I'd like to know what'd be the timeline for push state support for urianchor library or if there's any plan to add it in the future at all?
Thanks
Is there a way to partially update the url ? in this plugin
The SPA Listings link in the README file links to https://github.com/mmikowski/urianchor/blob/master/10 which does not appear to exist.
Running spa.html in the README example doesn't work
I get this in the HTML file
../5.2/spa.html
same goes for most of the js files
I have to copy the code from so many folders
Do I need to use a specific editor to automate the copying?
Do you recommend a listener to use in conjunction?
Lines 363-365 in jquery.uriAnchor.js:
uri_string = anchor_string
? uri_array[0] + '#!' + anchor_string : uri_array[0]
;
cause the page to be reloaded when the anchorMap passed in has all parameters removed, because line 378,
document.location.href = uri_string;
will then set document href to uri_array[0]
, which will not have a '#!'.
One fix would be to replace lines 363-365 with something like
uri_string = uri_array[0] + '#!' + (anchor_string ? anchor_string : "");
which will leave the hashbang in the HREF even when anchor_string is falsy.
There is an example that contains "online,true". To
judge by the map that follows, this should be "online,today".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.