jquery - Strike out a word in javascript when item clicked -
strike out word in javascript/jquery when item clicked.
so clicking , item ,the item fades out in same time want text strike out.
ex. have apple(image) , apple(text). when click on apple want image fade out , text strike out.
<div id="items"> <p>apple</p> </div> <div id="content"> <div class="box" id="pic1"> <img src = /images/apple.png /></div> <script> $("#pic1").click(function () { $("#pic1").fadeout("slow"); }); </script>
this code until image fades out cannot figure out how can make text strike out???
you wrap text in <del>
$("#pic1").click(function () { $("#items p").wrap("<del>"); $("#pic1").fadeout("slow"); });
Comments
Post a Comment