Advertisement
jithinsmmb

Untitled

Apr 5th, 2013
2,460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div onclick="myFunction()" id = "xx1" style="position: absolute; width: 209px; height: 607px; z-index:400" ><img src = "http://i.imgur.com/YqqQj2x.png"></img></div>
  2. <?php get_header(); ?>
  3.  
  4. <script>
  5. function myFunction()
  6. {
  7.     element = document.getElementById("xx1"); //the div element
  8.     img = element.firstChild; //the img element
  9.     element.removeChild(img); // you can use too: img.parentNode.removeChild(img); because the div is the parent of the img :o
  10.  
  11.  
  12. }
  13. </script>
  14.  
  15. I used above code to get image overlay feature over my blog post and on clicking the overlay image it must be removed.
  16. my webpage : http://netstrikers.comeze.com/?p=69
  17.  
  18. I have a problem that the overlay image is not in position , it has some problem in alignment ,(During zoom out the web page , overlay image changes its position)
  19.  
  20.  I want the overlay image exactly within the blog post container. can anyone help me to modify the code ,I'm not expert in coding.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement