You'll also need to add (or modify) the onclick attribute to your links. Use this example as a model for your own links:
Check out example.com
Get a grip! Bontrager's Race Lite Ergo Bar Ends add handlebar positions for climbing and comfort. The slight bend feels great and the rough finish keeps your hands where you want them.