We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replaceWith
// html
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <title></title> <link type="text/css" href="changeElement-hover.css" rel="stylesheet" /> <script type="text/javascript" src="Scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="Scripts/selectivizr-min.js"></script> <script> $(function () { function updateText() { $(this).text('newnewnewnewnewnewnewnewnewnewnew'); } function updateBox() { $(this).replaceWith($('<span class="box">newnewnewnewnewnewnewnewnewnewnew. </span>')); } $('.box').click(updateBox); }) </script> </head> <body> <span class="box">oldoldoldoldoldoldoldoldoldoldoldoldoldold. </span><span class="box">oldoldoldoldoldoldoldoldoldoldoldoldoldold. </span> </body> </html>
// css
.box { cursor: pointer; font-style: italic; } .box:hover { background-color: yellow; } .box:last-child { color: red; }
The above code illustrates a bug: after new element substitutes the old one by replaceWith, the hover effect is missing.
The text was updated successfully, but these errors were encountered:
In a word, inserted elements can't have hover effect (maybe it's because it won't be added 'slvzr-hover' to it).
Sorry, something went wrong.
This severely affects dynamic webpages.
No branches or pull requests
// html
// css
The above code illustrates a bug: after new element substitutes the old one by
replaceWith
, the hover effect is missing.The text was updated successfully, but these errors were encountered: