[jQuery] Moving DOM elements strings into $(document).ready(function(){

[jQuery] Moving DOM elements strings into $(document).ready(function(){

Hi
I want move DOM, elements, string.
It is a block
For Example
drupal_add_js('
$(document).ready(function(){
  // Ready code here.
  if ($("#class-box").val() > 0)
    mod_class_fields($("#class-box").val(), 0);
});
function mod_class_fields(class_id, speed) {
  var cfields;
  if (speed == null)
    speed = "slow";
  switch (class_id) {
    case "1":
      cfields = "mytarget1"
      break;
    case "2":
      cfields = "mytarget2";
      break;
    default:
      cfields = "<div></div>";
  }
  if (class_id == "0")
    $("#class-fields").hide("slow").empty();
  else
    $("#class-fields").empty().append(cfields).show(speed);
}
', 'inline');
So I have this line into JQUERY module and probably will be print
"mytarget1"
I would like to replace with
<div class="form-item">
 <label for="class-box">Jump Taxonomy: </label>
 <select id="class-box" class="form-select" onchange="mod_class_fields(
this.value);" name="taxonomy"><option value="0">... </option><option value="4">construction</option><option value="3">farm</option><option value="2">health</option><option value="1">industry</option></select>
</div>
Into Jquery String.
How Can I do that?<br clear="all">
--
Mário
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/