Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="SearchList">
- <a href="www.google.com/up">up</a>
- <a href="www.google.com/down">down</a>
- <a href="www.google.com/left">left</a>
- <a href="www.google.com/right">right</a>
- </div>
- <div id="SearchList">
- <a href="www.bing.com/up">up</a>
- <a href="www.bing.com/down">down</a>
- <a href="www.bing.com/left">left</a>
- <a href="www.bing.com/right">right</a>
- </div>
- // For each anchor element...
- $("#SearchList a").each(function() {
- // Change its 'href' attribute to...
- $(this).attr("href",
- // Its current 'href' attribute with a .replace() called
- $(this).attr("href").replace("google", "bing"));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement