Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6040317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:29:48+00:00 2026-05-23T06:29:48+00:00

I have been using the .htc version of PIE successfully on a new project

  • 0

I have been using the .htc version of PIE successfully on a new project (that will specifically target IE8+), however, I’m having trouble when trying to clone an element that has PIE-style applied to it.

I got a jsfiddle illustrating the problem here, and input is welcome (even other, similar approaches/alternatives to PIE) – however, .htc files cannot be referenced cross-domain, so this fiddle just contains the actual markup and CSS I use.

Any help is appreciated. What could be causing this, is there a potential workaround?

Cheers,
peol

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:29:49+00:00Added an answer on May 23, 2026 at 6:29 am

    There are two issues that are encountered when cloning elements with PIE’d descendants:

    1. The VML elements that PIE has inserted will also be included in the cloned content, but they are cloned incorrectly with no namespace prefix for some reason, and
    2. The unique _pieId attribute that PIE puts on each of its target elements is also copied in the clone, which leads to collisions between ids that are no longer unique.

    So in order to do a proper clone, we need to get rid of both. The first can be done by temporarily setting the behavior style property of each PIE’d element to ‘none’ while cloning and restoring it afterward. Setting it to ‘none’ triggers PIE’s cleanup methods which remove all the VML elements. The second item has to be done manually, as PIE does not remove the _pieId attributes automatically. Both of these are easy enough to script.

    Here is a custom jQuery extension that handles this in my limited testing:

    jQuery.fn.cloneWithPIE = function(dataAndEvents, deepDataAndEvents) {
        // Find elements with PIE attached and remove their behaviors:
        var pied = this.find('[_pieId]').css('behavior', 'none');
    
        // Perform the clone:
        var clone = this.clone(dataAndEvents, deepDataAndEvents);
    
        // Remove the _pieId from each of the original and cloned 
        // elements, and restore the behavior:
        pied.add(clone.find('[_pieId]')).removeAttr('_pieId').css('behavior', '');
    
        return clone;
    }
    

    You then would call the cloneWithPIE method just like you would call the normal clone method:

    $('.someEl').cloneWithPIE().appendTo(newParent)
    

    Hope that works for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using WPF for a new project which is far from done.
I have been using the 'Web Site Administration Tool' that you can bring up
I have been using attachment_fu on a project for a long time and all
I have been using json.NET successfully in projects for some time now without any
I have been using WebForms until now and now wish to learn MVC. However
I have been using SDL with success to learn OpenGL, however I am following
I have been using doctrine with zend in a project without modules. It is
We have some really old code that calls WebServices using behaviours (webservice.htc), and we
I have been using explode(.,$mystring) to split a paragraph into sentences. However this doen't
I have been using Visual Studio integrated with Source Safe for years, when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.