I am attempting to get the innerHTML
of the next element, next to which a Click has occured.
So far, I have this as my code
$('translate_this').observe('click', function(e) {
// Immediately stop the click through
Event.stop(e);
x = this.next().innerHTML;
alert(x);
});
However, nothing actually happens, which suggests the variable isn't being populated with anything at all. Why is this.
HTML for reference
<li class="say public">
<p>
<span style="padding: 2px 7px; background-color: rgb(230, 230, 230); -moz-border-radius-topleft: 6px; -moz-border-radius-topright: 6px; -moz-border-radius-bottomright: 6px; -moz-border-radius-bottomleft: 6px;">
<a id="translate_this" href="">Translate</a>
</span>
</p>
<div class="post_non_translated">
<p>Bonjour </p>
</div>
</li>