$( document ).ready(function() { $(".dropdown-toggle").click(function(){ var url = $(this).attr("href"); $(location).attr('href', url); }); });