I feel like my logic makes sense; unfortunately, it doesn’t 🙁 ?
UPDATE: livecode
Question:
How can I on mouseenter grab $(this).attr.('title') and set that text to ('HGROUP h1')‘s text?
jQuery
$("div.box").on('mouseenter', function () { //select the box create mouseenter function
var headerText = $(this).attr('title'); //get selected title and set to headerText
$('HGROUP h1').text(headerText); //set hgroupd h1 text to headerText
});
$("div.box").on('mouseleave', function () { //select the box create mouseleave function
$('HGROUP h1').text('DESIGNOBVIO.US'); //set the orginal text back in place on mouseleave
});
HTML
<div class="box">
<h1 title="can i haz it?2"></h1>
<div class="innerbox">
<figure></figure>
<ul class="categorySelect">
<li class="misc"></li>
<li class="print"></li>
<li class="video"></li>
<li class="web"></li>
</ul>
</div>
Hgroup HTML
<HGROUP>
<h1>designobvio.us</h1>
<h2>the colors duke, the colors!7</h2>
</HGROUP>
Any further explanation of where i went wrong would be awesome.
Change this:
To:
Your code is trying to get the title of div instead of it’s
<h1>child .