javascript - Custom bootstrap slider indicator links -


i've changed bootstrap carousel indicator links image tiles link off page. i've got javascript changes slider on tile hover , when tile clicked should take new page.

to change hover have (which works fine)

$("#carousel-custom .carousel-indicators li").hover(function(){   var goto = number( $(this).attr('data-slide-to') );   $("#carousel-custom").carousel(goto); }); 

and change page have

$("#carousel-custom .carousel-indicators li").click(function(){   var url = $('.getlink').attr('href');   window.location = url; }); 

this redirect home page rather new page link. html tag is

<a href="/venue-hire/test" class="getlink"></a> 

fixed - referencing first slide

$("#carousel-custom .carousel-indicators li").click(function(){   var url = $(this).find('a').attr('href');   window.location = url; }); 

Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -