0

I've recently bought a Ning account. You can't edit any html at all.

The only thing you can do is style the original div's with css. There's a custom code feature where you can add javascript.

I have a div called xn_bar_menu_branding. Can this be linked to a url say: google.com using javascript?

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
user1139498
  • 101
  • 1
  • 4

2 Answers2

3

If with named you mean that it has an id="xn_bar_menu_branding" then you can do

$('#xn_bar_menu_branding').click(function(){
  window.location.href = 'http://google.com';
});

But this will only work for javascript enabled browsers, and it will also not be good for SEO purposes.


If you want the mouse to change to a hand when it hovers the div you can do that with CSS with this rule

#xn_bar_menu_branding{ cursor: pointer; }
Gabriele Petrioli
  • 191,379
  • 34
  • 261
  • 317
1
$('#xn_bar_menu_branding').html('<a href="http://google.com>Google.com</a>"');

This will replace anything in that div with that id with a link to google

Alex
  • 7,538
  • 23
  • 84
  • 152