Question

i am trying to 'clone' an element and delete old, i want to do this because I have a z-index problem in IE and will do it using conditional comments:

<!--[if lte IE 7]>
<script type="text/javascript">
    $(document).ready(function() {
            var callCenter = $('#callCenter').html();
            alert(callCenter);
            $('#callCenter').remove();
            $('body').prepend("<div id='callCenter'>"+callCenter+"</div>");
    });
</script>
<![endif]-->

the problem is that the alert shows something like (without "" )

enter image description here

So the clasenames are kind of lost

<span class=clasname> instead of <span class="clasname">

-EDIT-

Trying with

    <!--[if lte IE 7]>
<script type="text/javascript">
    $(document).ready(function() {
            $('#callCenter').prependTo('body');
    });
</script>
<![endif]-->

is this a internet explorer thing?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top