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???

jsfiddle demo

you wrap text in <del>

$("#pic1").click(function () {  $("#items p").wrap("<del>");  $("#pic1").fadeout("slow"); }); 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -