How to make the box open without the user pressing the text

Asked

Viewed 88 times

3

I have a problem and I can’t remove the click to open the text box, I want to leave the text box always open and mandatory, how do this?

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>';

1 answer

1

Use the event onload, example:

......
<script type="text/javascript">
      $(document).ready(function() {
         $('body').onload(function() {
            $('startMatter').toggle();
            return false;
         });
      });   
   </script>
....

If there’s a div to activate:

<script type="text/javascript">
    $(document).ready(function () {

        $("q_editor jcmr-small").onload(function () {
            $(this).toggleClass("ativo").next().toggle();
        });
    });
</script>
  • I can’t fit that into the code, how would it be complete ? to make the substitution ?

  • At least try to do, don’t expect others to do your job

Browser other questions tagged

You are not signed in. Login or sign up in order to post.