Ariel beat me to what I was going to say! VERY bad idea if you want to
register in search engines
Liam
Ariel Flesler wrote:
Ok then:
$('div.box[title]').each(function(){
$('h3 /').text( this.title ).prependTo(this);
});
Note that you're giving non-js users (and search engines) less
Whether or not this should be done, I don't know. It modifies the way
the user gets the title (much more subtle/hidden the second way).
How to do this ?
$('div.box').each(function(){
this.title = $(this).find('h3').remove().attr('title') || '';
});
--
Ariel Flesler
Thanks for the reply, but I think what you did was take the first way
and convert it to the second. I think anyway, I gave it a shot just
in case and it didn't end up as desired.
What I'd like to do is start writing my box divs like the second way
(without the nested h3 and div) so there's less
Ok then:
$('div.box[title]').each(function(){
$('h3 /').text( this.title ).prependTo(this);
});
Note that you're giving non-js users (and search engines) less
semantical html.
You probably want google to recognize (sub)titles on your pages.
--
Ariel Flesler
http://flesler.blogspot.com/
On
4 matches
Mail list logo