Show Title without mouseovering on it.

  • Thread starter ComfortablyNumb
  • Start date
C

ComfortablyNumb

guys,
i am changing the title of a span.
what i want to also do is, as soon as i change the title of the span, i
want to display that title without moving my mouse over it.
i am trying to do this through javascript.

i dont know if this is in anyways possible, but experts on this group
might help me out and guide me in the right direction.

thanks
 
E

Evertjan.

ComfortablyNumb wrote on 03 feb 2006 in comp.lang.javascript:
guys,
i am changing the title of a span.
what i want to also do is, as soon as i change the title of the span, i
want to display that title without moving my mouse over it.
i am trying to do this through javascript.

i dont know if this is in anyways possible, but experts on this group
might help me out and guide me in the right direction.

<span title='aaa'id='s1'>my title is: <span id='s2'></span></span>

<script type='text/javascript'>
function show(){
document.getElementById('s2').innerHTML =
document.getElementById('s1').title
}
setInterval('show()',30)
</script>

not tested
 
E

Evertjan.

Good Man wrote on 03 feb 2006 in comp.lang.javascript:
i got the impression that the OP wanted to have the contents of the
title parameter displayed. ie: if you hover over a div like so:

<div id="party" title="We all love to party"></div>

Then you get a nice pop-up bubble on top of your mouse pointer that
says "We all love to party". However, I don't think its possible to
display the contents of a title parameter without mousing over the tag
directly.

Your suggestion would be a good work-around.

The OP could display a "fake"-title with overlib:

<http://www.bosrup.com/web/overlib/>

And test every 50 milisecond for (title!=oldTitle)

However, since the changing of the title would be a JS DOM maniipulation,
why not trigger it by the same action?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top