Unable to .append(); without eliminating all the spaces in the code

hakan33

New Member
\[code\]$('#form_holder').append('<div id="spec_id_'+count+'"><div class="avail_container"><input class="avail_fields" type="checkbox" checked="checked" name="special'+count+'" /><span class="avail_field_label">Special Date</span></div><div class="avail_container"><div class="avail_time_container"><span class="field_label">Time</span> <select name="special'+count+'_time_from_1"> <?php for ($t = 0; $t<24; $t++){ ?> <option value="http://stackoverflow.com/questions/4560059/<?php echo $t; ?>"><?php echo $t; ?></option> <?php } ?> </select>: <select name="special'+count+'_time_from_2"> <?php for ($t = 0; $t<60; $t+=15){ ?> <option value="http://stackoverflow.com/questions/4560059/<?php if($t == 0){ echo $t .'' . $t; }else{ echo $t; } ?>"><?php if($t == 0){ echo $t . '' . $t; }else{ echo $t; } ?></option> <?php } ?> </select> <span class="field_label">to</span> <select name="special'+count+'_time_to_1"> <?php for ($t = 0; $t<24; $t++){ ?> <option value="http://stackoverflow.com/questions/4560059/<?php echo $t; ?>"><?php echo $t; ?></option> <?php } ?> </select>: <select name="special'+count+'_time_to_2"> <?php for ($t = 0; $t<60; $t+=15){ ?> <option value="http://stackoverflow.com/questions/4560059/<?php if($t == 0){ echo $t .'' . $t; }else{ echo $t; } ?>"><?php if($t == 0){ echo $t . '' . $t; }else{ echo $t; } ?></option> <?php } ?> </select> </div></div></div>');\[/code\]I'm assuming javascript or jquery does not like breaks like I have here, because all my javascript code does not work. What would be an alternative to eliminating all the spaces, which would make viewing the code difficult?
 
Top