i have a little css problem. There is a div which is only display an image of an help mark. What i try is on clicking on this image the next div on the same level is display:inline-block. On a second click it is display:none again.
The display:inline-block on :active is working but it is not toggle.
There is JQuery:
(function($) {
// Execute after the page was fully
setTimeout( function(){
if ($('#jsonPayload').length) {
// scope to JSD
var banner = jQuery('<div class="helpmark">'
+ '<img class="emoticon" align="adsmiddle" src="@contextPath/plugins/cute/static/resource/SD-CGM-TT/help_16.gif" />'
+ ' @message'
+ '</div>');
banner.insertBefore('div.description');
}
}, 1)
})(jQuery);
And the HTML around the Elements we are looking for
<div class="helpmark">
<img class="emoticon" src="http://*********/plugins/cute/static/resource/SD-CGM-TT/help_16.gif"> </div>
<div class="description">
<p>Hier können Sie einen kurzen Betreff einfügen</p>
</div>
by clicking on .helpmark .description is displayed
And the CSS i have
.helpmark {
cursor: pointer;
display: inline-block;
margin-top: 5px;
}
.helpmark:active + .description {
display: inline-block;
}
.description {
display: none;
}
I hope anybody can help me.
Best regards, Stephan