Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to replace image onmouseover

How to replace image onmouseover

Scheduled Pinned Locked Moved ASP.NET
tutorialhelp
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Eddie1987
    wrote on last edited by
    #1

    Hey I want to change a image that is in one td when my mouse moving over a onther element like (text, another td, tr, table) example : // the image that needed to be switch with another image

    TEXT

    // here i want to creat a mouseover/out option please help thank's

    S 1 Reply Last reply
    0
    • E Eddie1987

      Hey I want to change a image that is in one td when my mouse moving over a onther element like (text, another td, tr, table) example : // the image that needed to be switch with another image

      TEXT

      // here i want to creat a mouseover/out option please help thank's

      S Offline
      S Offline
      Shahriar Iqbal Chowdhury Galib
      wrote on last edited by
      #2

      Hi, using JQury can do the trick. First assign id to your table/image elements, for example

      <table id="table1">
      <tr>
      <td>
      <b><img id="img1" src="ABC.jpg"/></b>
      </td>
      </tr>
      </table>
      <table id="table2">
      <tr>
      <td>
      <b>TEXT</b>
      </td>
      </tr>
      </table>

      Now use jquery

      $("#table2").mouseover(function() {
      $("#img1").attr("src","xyz.jpg");
      }).mouseout(function(){
      $("#img1").attr("src","abc.jpg");
      });

      Thus mouseover event triggers each time you hover table2 and change the image to xyz.jpg you will get similar concept from here[^] Hope this will help

      E 1 Reply Last reply
      0
      • S Shahriar Iqbal Chowdhury Galib

        Hi, using JQury can do the trick. First assign id to your table/image elements, for example

        <table id="table1">
        <tr>
        <td>
        <b><img id="img1" src="ABC.jpg"/></b>
        </td>
        </tr>
        </table>
        <table id="table2">
        <tr>
        <td>
        <b>TEXT</b>
        </td>
        </tr>
        </table>

        Now use jquery

        $("#table2").mouseover(function() {
        $("#img1").attr("src","xyz.jpg");
        }).mouseout(function(){
        $("#img1").attr("src","abc.jpg");
        });

        Thus mouseover event triggers each time you hover table2 and change the image to xyz.jpg you will get similar concept from here[^] Hope this will help

        E Offline
        E Offline
        Eddie1987
        wrote on last edited by
        #3

        I have JScript1.js not JQury I using Visual Basic 2008 Please help thank's

        N 1 Reply Last reply
        0
        • E Eddie1987

          I have JScript1.js not JQury I using Visual Basic 2008 Please help thank's

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Then download it, http://jquery.com/[^]


          I know the language. I've read a book. - _Madmatt

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups