tags:

views:

37

answers:

1

I have five links that I want to change the content in the same separate DIV. There's different content corresponding to each link. On the mouseleave, I need the default text to return inside the separate DIV.

Has anyone already done this or can guide me? I prefer jquery.

Thanks!

A: 
$("a.link").mouseleave(function() {
   $("#sepdiv").text($(this).text());
});
//share the same class ("link" as an example) with all your links. and have an id for the separate div

You question isn't clear and I don't have any code that I can base this on but I hope this is what you where looking for. let me know so I can edit my answer!

Edit:

After looking at the website shared in the comment:

js

$(document).ready(function() {
  //this is your code - just add it all under one document load
  $.preloadCssImages();
  $('#slider').nivoSlider();


  $('a.share-links').hover(function() {
    $('#ms').text($(this).text());
  }, function() {
    $('#ms').text(function() {
       return $(this).attr("title");
    });
  });
});

css

.share-links
{
  text-indent:-9999px;
}

html

<div id="ms" title="Our crusade to feed every orphan in the world.">
  Our crusade to feed every orphan in the world.
</div>

<div id="nc_wrap2">
  <a class="nc1 share-links" href="#">Facebook</a>
  <a class="nc2 share-links" href="#">Twitter</a>
  <a class="nc3 share-links" href="#">..</a>
  <a class="nc4 share-links" href="#">..</a>
  <a class="nc5 share-links" href="#">..</a>
</div>

I hope this is better!

Mouhannad
Here is my link: www.feedmyorphan.com look at the links on the bottom. I want the center text to change with all the links on the left and right in the footer, and return to its default with mouseleave.
Erik
the website looks great. i hope my edit is more helpful!
Mouhannad