quirkey / sammy

Sammy is a tiny javascript framework built on top of jQuery, It's RESTful Evented Javascript.
http://sammyjs.org
MIT License
2.99k stars 384 forks source link

Is SammyJs capable of routing without hash in the URL #262

Open iberodev opened 6 years ago

iberodev commented 6 years ago

I see there is a branch called non-hash and when using the Github comparer it seems that all contents from non-hash branch are in master branch.

I am using sammyJs and I'd like to have the routing without the hash character to make it SEO-friendly. Unfortunately I cannot find any documentation on whether sammyJs is capable of doing so or how to do it.

Any help would be much appreciated.

Thanks in advance.

El-Mahbub commented 6 years ago

Sammy is build from jquery, so you can do all with jquery. this.get(''); will return to index or page that you set before. or inside this.get('') give your function like this : this.get('',function(context){ yourfunction(context.$element()); }); function yourfunction(el){ el.html('your html or php'); //or window.location.href = 'index.html'; }

Maybe i can help you