Reputation: 101
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?
Upvotes: 0
Views: 396
Reputation: 7688
$('#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
Upvotes: 1
Reputation: 196236
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; }
Upvotes: 3