I am trying to use an ajax code in my site. My problem is that I want only to use last part of the link.. otherwise the hash value becomes as here :
http://localhos./~ytsejam/wlog/public/#http://localhos./~ytsejam/wlog/public/index.php/
This is my line and ajax code for hashing :
window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-4);
and here is my menu item in the source
<li><a href="http://localhos./~ytsejam/wlog/public/index.php/abouts">HAKKIMIZDA</a></li>
.
How can I change subsrt value to work here?
Rather than parsing URL strings, I suggest you be more explicit in assigning data.
Try something like this
Then use the data attribute in your event handler
Update
Using
HTML::link_to_route(), you would do something likeI suggest you become familiar with the documentation for your framework of choice.