how to show some information when the image is hovered and display some content when it is clicked

how to show some information when the image button is hovered and display some content when it is clicked .

please refer the below link . how to do the in a single html page .

This is my code , which i have to enhance

thank you .

<link rel="stylesheet" href="" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

<script src="">



    $("button").click(function() {
      if ( this.value == '1')

      else  if ( this.value == '2')



<div class="container">

<div id='purpose' >                                             
    <button type="button" class="btn btn-primary" value="1">About us</button>
    <button type="button" class="btn btn-primary" value="2">Services</button>

<div style='display:none;' id='business'><br/>
<h1> 1st one </h1>

<div style='display:none;' id='business_new'><br/> 
<h1> 2nd one </h1>




use jquery


You can use jQuery to do both things. To solve hover events you can use two jQuery APIs:

  1. .hover() -


$("#img_btn").hover(function() {
  //do something
  1. .mouseover() -


$("#img_btn").mouseover(function() {
  //do something

For your example a possible solution could look like this:

$("button").hover(function() {
    if ( this.value == '1') {
        //do something when button 1 is hovered
    } else  if ( this.value == '2') {
        //do something when button 2 is hovered


Need Your Help

In Moose subroutines, how does $meta get into @_?

perl moose

chromatic's recent blog got me curious about the Moose subroutine has. I was looking at the Moose source code and noticed that inside the has subroutine, there is a $meta variable unpacked from @_....

Hibernate exception in inserting data in asyn manner

spring hibernate insert

I am using Spring RESTful service, these service are accessed by Android device for inserting data in our database. when two simultaneous request comes it gives the exception. I am using MySQL data...