Hi Vadim,
I'm not entirely sure why this happens, but I know that this can be
achieved if you call show() AFTER appending the element (and you
probably want to remove the 'id' attribute from the clone too, so you
don't duplicate the id):
$("#clonable").clone().removeAttr('id').appendTo('body').show();
- Mark.
2009/9/28 Vadim <[email protected]>:
>
> Hi,
>
> I have a element, which has a css class with display: none (it's
> important, because when the display:none is specified inline, the
> issue is not reproduceble). I want to clone it, and then show the
> clone. When I show it with effects, everything is ok. But when it's
> called just show() IE and Chrome do not show the element, in Firefox
> everything is fine
>
> I've tested on:
> IE8.0.7600, Firefox 3.5.3 and Chrome 3.0.195.21
>
> Here is an example to reproduce this behaviour:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <script src="http://code.jquery.com/jquery-latest.js"></script>
> <style>
> .hidden {
> display:none;
> }
> </style>
> <script>
> $(document).ready(function(){
> $('body').append($("#clonable").clone().show());
> });
> </script>
>
> </head>
> <body>
> <p class="hidden" id="clonable">Hello 1</p>
> </body>
> </html>
>
> I will be happy if you solve this problem
>
> Br,
> Vadim
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---