Of course, there is an obvious answer to this question, but I do not know this. I am dynamically loading a page using jQuery. .load()The page "Uploaded" has a form with form elements, for example. input type="number"(HTML5).
Is there any reason why if I have a slideToggle () form, the form elements are returned back to input type="text", but if I am toggle()(simple toggle()), the elements remain "true". Similarly, if I add toggle('slow')form elements always return toinput type="text"
Ok The HTML on page 1 is as follows:
<form method="post" id="frmcreate">
<ol></ol>
<input type="submit" id="testit" />
</form>
it loads into it like this: yes doc ready (), etc.
$('ul#fieldtypes li a').click(function(){
var id_timestamp = new Date().getTime();
var id = $('.inputlength').length;
$( "#frmcreate ol" ).append('<li id='+id_timestamp+' class="inputlength"></li>');
$('#'+id_timestamp).load('test1.php?y='+id);
return false;
});
This is a form uploaded
Type <input type="text" name="fieldmeta<?php echo $y; ?>[type]" /> <?php echo $error; ?>
<br/>
Name <input type="text" name="fieldmeta<?php echo $y; ?>[name]" value="<?php echo $y; ?>" /> <?php echo $error; ?>
<br/>
<div class="optoggle">OPTIONS</div>
These are the “options” downloaded from another page:
<li>Cols<input type="number" name="fieldmeta<?php echo $y; ?>[cols]" /> <?php echo $error; ?></li>
<li>Rows<input type="number" name="fieldmeta<?php echo $y; ?>[rows]" /> <?php echo $error; ?></li>
<li>Size<input type="number" name="fieldmeta<?php echo $y; ?>[size]" /> <?php echo $error; ?></li>
They are loaded as follows:
$('.optoggle').live('click',function(){
$(this).next('div').toggle();
});