Question:
I have a problem and I can't remove the click to open the text box, I want to keep the text box always open and mandatory, how do I do that?
I think the code is this:
html += '<div class="qstxt">
<span onclick="$(\'#startMatter\').toggle();"
title="Add a description of the question" class="q_editor jcmr-small"
style="visibility:visible;margin-left:0;">Add a description of the question »
</span>
<textarea class="glotxtclass jcmr-hide " id="startMatter" style="margin-top:10px;"
onfocus="$.focus(this,\'\',$.Q.replenish(this));"
name="question_detail" title="Additional issue Information...">
</textarea>
</div>';
Answer:
Use the onload
event, for example:
......
<script type="text/javascript">
$(document).ready(function() {
$('body').onload(function() {
$('startMatter').toggle();
return false;
});
});
</script>
....
If there is a div to activate:
<script type="text/javascript">
$(document).ready(function () {
$("q_editor jcmr-small").onload(function () {
$(this).toggleClass("ativo").next().toggle();
});
});
</script>