Quantcast
Channel: bbird.me
Viewing all articles
Browse latest Browse all 10

How to change href value using jQuery

$
0
0

If you have a situation where you would like to change href atribute (URL, that is), but can’t access the code directly, you can definitely try using jQuery prop():

jQuery(document).ready(function($){
$(".home container a").prop("href", "http://google.com/");
});

So all you need to do is target <a> element within container and this should do the trick.

 

Post How to change href value using jQuery je prvi puta viđen na bbird.me.


Viewing all articles
Browse latest Browse all 10

Trending Articles