I searched too much but not found any working answer that resolved my problem. As shown in images i want to scroll/show selected div (when click) to top of iframe. I try to use jquery scrolltop from <http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_eff_animate_smoothscroll> but code not working for me because it works on id and i have classes in divs. But, i edit code to work with classes but, when i run code href="#0" behave like url address and when I click on div nothing happens. can their is any way to replace "a" tag with some another tag to resolve problem. 

This is my source code from Dbimage.php page :

```
  <!DOCTYPE html>
   <html>
     <head>
   <script>
          $(document).ready(function(){
          $(".ScrollTop").on('click', function(event) {
          if (this.hash !== "") {
           event.preventDefault();
           var hash = this.hash;
          $('html, body').animate({
           scrollTop: $(hash).offset().top
          }, 800, function()
           {
         // Add hash (#) to URL when done scrolling (default click behavior)
         window.location.hash = hash;
     });
  } // End if
  });
  });
  </script>

 <style>
  body, html
  {
     height: 100%;
   }
  .GalleryContentDiv 
  {
     min-height: 300px;
  }
  </style>

  </head>
    <body>

 <a class="ScrollTop" href="#0"> 
  <div class="GalleryContentDiv" id="#0" style="border:1px solid transparent; margin-top:30px; ">

     <!-- contents for great cities 1-->
      </div><br>
  </a> 
     <a  class="ScrollTop" href="#1">
  <div class="GalleryContentDiv" id="#1" style="border:1px solid transparent; margin-top:30px; ">

     <!-- contents for nature 2-->
     </div><br>
     </a>
    </body>
   </html>

```

This is my Iframe code :

```
<iframe id="iframe-Db-Gallery"
 src="http://localhost/HtmlFormGallery/DbImage.php"
 style="width: 95%;height: 350px;margin-left: 4%;" marginheight="0"  > 
</iframe>

```

Any solution please ?

[![Great cities 1 div](https://i.stack.imgur.com/MKsFo.png)](https://i.stack.imgur.com/MKsFo.png)
[![Great cities 1 div](https://i.stack.imgur.com/KYPCx.png)](https://i.stack.imgur.com/KYPCx.png)