admin管理员组文章数量:1415664
Currently, I'm using following function which works with click event.
$('a.ux-thumb-wrap').click(function(e){
e.preventDefault();
href=$(this).attr('href');
if($(player_container).is(":visible")){
$(player).tubeplayer('play', href)
}
else {
$(player).tubeplayer({
width: 853,
height: 480,
allowFullScreen: "true",
preferredQuality: "large",
loadSWFObject: false,
modestbranding: false,
initialVideo: href,
autoPlay: true
});
player_container.slideDown("slow");
}
I want to get this result
If visitor entered direct url address of some movie (which looks like: domain/?page=youtube#5hly8) into the address bar then fetch the value standing after
#
symbol and assign tohref
, do the rest of functionDuring playback, If user clicks on another thumbnail, change the value after
#
symbol on adress bar to thumbnails href tag, and do the rest of function
I didn't work with hashtags before. Please Help me to modify this function.
Currently, I'm using following function which works with click event.
$('a.ux-thumb-wrap').click(function(e){
e.preventDefault();
href=$(this).attr('href');
if($(player_container).is(":visible")){
$(player).tubeplayer('play', href)
}
else {
$(player).tubeplayer({
width: 853,
height: 480,
allowFullScreen: "true",
preferredQuality: "large",
loadSWFObject: false,
modestbranding: false,
initialVideo: href,
autoPlay: true
});
player_container.slideDown("slow");
}
I want to get this result
If visitor entered direct url address of some movie (which looks like: domain./?page=youtube#5hly8) into the address bar then fetch the value standing after
#
symbol and assign tohref
, do the rest of functionDuring playback, If user clicks on another thumbnail, change the value after
#
symbol on adress bar to thumbnails href tag, and do the rest of function
I didn't work with hashtags before. Please Help me to modify this function.
Share Improve this question edited Jul 11, 2013 at 19:25 Tural Ali asked Dec 17, 2011 at 17:08 Tural AliTural Ali 23.3k18 gold badges81 silver badges133 bronze badges1 Answer
Reset to default 4Use the jquery hashchange plugin for a lightweigth approach: http://benalman./projects/jquery-hashchange-plugin/
Even better in the long run is the backbone.js router: http://documentcloud.github./backbone/#Router
本文标签: jqueryJavascript hashtag navigationStack Overflow
版权声明:本文标题:jquery - Javascript hashtag navigation - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745230514a2648802.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论