Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery slideToggle problems
    primarykey
    data
    text
    <p>sure there is a obvious answer to this one but I don't know it. I am dynamically loading a page using JQuery <code>.load()</code> On the "loaded" page there is a form with form elements e.g. <code>input type="number"</code> (HTML5).</p> <p>Is there any reason why if I slideToggle() the form the form elements always revert back to <code>input type="text"</code> yet if I <code>toggle()</code> - (just <code>toggle()</code>) the elements remain "true" Likewise if I add <code>toggle('slow')</code> the form elements always revert back to <code>input type="text"</code></p> <p>Ok. The HTML code on "page1" looks like this:</p> <pre><code>&lt;form method="post" id="frmcreate"&gt; &lt;ol&gt;&lt;/ol&gt; &lt;input type="submit" id="testit" /&gt; &lt;/form&gt; </code></pre> <p>it is loaded into this like this - yes doc ready() etc.</p> <pre><code>$('ul#fieldtypes li a').click(function(){ var id_timestamp = new Date().getTime(); var id = $('.inputlength').length; $( "#frmcreate ol" ).append('&lt;li id='+id_timestamp+' class="inputlength"&gt;&lt;/li&gt;'); $('#'+id_timestamp).load('test1.php?y='+id); return false; </code></pre> <p>});</p> <p>This is the form that is loaded</p> <pre><code>Type &lt;input type="text" name="fieldmeta&lt;?php echo $y; ?&gt;[type]" /&gt; &lt;?php echo $error; ?&gt; &lt;br/&gt; Name &lt;input type="text" name="fieldmeta&lt;?php echo $y; ?&gt;[name]" value="&lt;?php echo $y; ?&gt;" /&gt; &lt;?php echo $error; ?&gt; &lt;br/&gt; &lt;div class="optoggle"&gt;OPTIONS&lt;/div&gt; </code></pre> <p>These are the "options" loaded from another page:</p> <pre><code>&lt;li&gt;Cols&lt;input type="number" name="fieldmeta&lt;?php echo $y; ?&gt;[cols]" /&gt; &lt;?php echo $error; ?&gt;&lt;/li&gt; &lt;li&gt;Rows&lt;input type="number" name="fieldmeta&lt;?php echo $y; ?&gt;[rows]" /&gt; &lt;?php echo $error; ?&gt;&lt;/li&gt; &lt;li&gt;Size&lt;input type="number" name="fieldmeta&lt;?php echo $y; ?&gt;[size]" /&gt; &lt;?php echo $error; ?&gt;&lt;/li&gt; </code></pre> <p>They are loaded like this:</p> <pre><code>$('.optoggle').live('click',function(){ $(this).next('div').toggle(); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload