how can I add the /
char at the end of the URL
without force the user to write it?
I'm starting to work with SWFAddress
using JavaScript
and jQuery
directly (without Flash
) like this wonderful site.
So something like this:
http://mysite.com/section
// and after click to a specific <a ="#">button</a> get
http://mysite.com/section/#/sub-content
// instead of
http://mysite.com/section#/sub-content
I've started with this code to do it:
$(".time_dot, .time_year").click (function () {
onClickEvent (this);
});
function onClickEvent (dom) {
var timer = setTimeout (function () {
SWFAddress.setValue($(dom).parent().attr("id"));
}, 200);
// do something else
}
The setTimeout
method is used to avoid the <a>
button overwrite the SWFAddress.setValue
method, but I don't know a way to change the URL address
to url.com/content#/...
to url.com/content/#/...
.
How can I do that?