Loading ...
Sorry, an error occurred while loading the content.

Re: [JavaScript] onmouseover - I want the cursor to display a 'hand'

Expand Messages
  • Bipool
    you can use like this onmouseover = this.style.cursor= select ; Thanks On Tue, Sep 29, 2009 at 5:03 AM, David Smart
    Message 1 of 9 , Sep 28, 2009
    View Source
    • 0 Attachment
      you can use like this onmouseover = "this.style.cursor='select'";

      Thanks

      On Tue, Sep 29, 2009 at 5:03 AM, David Smart <smartware.consulting@...
      > wrote:

      >
      >
      > Did you do a Google search? Plenty of information there.
      >
      > Regards, Dave S
      >
      >
      > ----- Original Message -----
      > From: "tomdcarden" <tomdcarden@... <tomdcarden%40yahoo.com>>
      > To: <JavaScript_Official@yahoogroups.com<JavaScript_Official%40yahoogroups.com>
      > >
      > Sent: Sunday, September 27, 2009 6:29 AM
      > Subject: [JavaScript] onmouseover - I want the cursor to display a 'hand'
      >
      > > Hi All,
      > > my first post here,,..i think?
      > >
      > > simply trying to do the following,
      > >
      > > use a mouseover event to change the cursor to a hand. i did a search and
      > > couldn't find anything that worked. does anyone know what the syntax
      > would
      > > be?
      > >
      > >
      > >
      > > ------------------------------------
      > >
      > > Visit http://aiaiai.com for more groups to joinYahoo! Groups Links
      > >
      > >
      > >
      >
      > ----------------------------------------------------------
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.409 / Virus Database: 270.13.114/2401 - Release Date: 09/28/09
      >
      > 17:53:00
      >
      >
      >


      [Non-text portions of this message have been removed]
    • tomdcarden
      Yes, i did, i know how to address with CSS, but couldn t find how to control with JS. i.e, connect the CSS and JS. if you know of anything, please let me know.
      Message 2 of 9 , Sep 28, 2009
      View Source
      • 0 Attachment
        Yes, i did, i know how to address with CSS, but couldn't find how to control with JS.
        i.e, connect the CSS and JS. if you know of anything, please let me know.

        thank you





        --- In JavaScript_Official@yahoogroups.com, "David Smart" <smartware.consulting@...> wrote:
        >
        > Did you do a Google search? Plenty of information there.
        >
        > Regards, Dave S
        >
        > ----- Original Message -----
        > From: "tomdcarden" <tomdcarden@...>
        > To: <JavaScript_Official@yahoogroups.com>
        > Sent: Sunday, September 27, 2009 6:29 AM
        > Subject: [JavaScript] onmouseover - I want the cursor to display a 'hand'
        >
        >
        > > Hi All,
        > > my first post here,,..i think?
        > >
        > > simply trying to do the following,
        > >
        > > use a mouseover event to change the cursor to a hand. i did a search and
        > > couldn't find anything that worked. does anyone know what the syntax would
        > > be?
        > >
        > >
        > >
        > > ------------------------------------
        > >
        > > Visit http://aiaiai.com for more groups to joinYahoo! Groups Links
        > >
        > >
        > >
        >
        >
        > --------------------------------------------------------------------------------
        >
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - www.avg.com
        > Version: 8.5.409 / Virus Database: 270.13.114/2401 - Release Date: 09/28/09
        > 17:53:00
        >
      • Mauricio Rocha
        Usually, people use CSS (cascade style sheet) instead of javascript. If you use javascript you ll need to turn on and off (mouseover && mouseout), CSS does it
        Message 3 of 9 , Sep 29, 2009
        View Source
        • 0 Attachment
          Usually, people use CSS (cascade style sheet) instead of javascript. If you use javascript you'll need to turn on and off (mouseover && mouseout), CSS does it automatically.

          But if it is a link, the only thing you have to do is to use :hover right after the class or for the link itself. // Only works in links if ie6, it'll work in any other browser.

          html:
          <a href="http://mysite.com/mypage" class="myLinksPages">visit us</a>

          css:
          a:hover { cursor:pointer; }

          or
          css:
          .myLinksPages:hover { cursor:pointer; }

          Learn CSS:
          http://www.w3schools.com/css/default.asp


          --- On Mon, 9/28/09, David Smart <smartware.consulting@...> wrote:

          From: David Smart <smartware.consulting@...>
          Subject: Re: [JavaScript] onmouseover - I want the cursor to display a 'hand'
          To: JavaScript_Official@yahoogroups.com
          Date: Monday, September 28, 2009, 7:03 PM






           





          Did you do a Google search? Plenty of information there.



          Regards, Dave S



          ----- Original Message -----

          From: "tomdcarden" <tomdcarden@yahoo. com>

          To: <JavaScript_Official @yahoogroups. com>

          Sent: Sunday, September 27, 2009 6:29 AM

          Subject: [JavaScript] onmouseover - I want the cursor to display a 'hand'



          > Hi All,

          > my first post here,,..i think?

          >

          > simply trying to do the following,

          >

          > use a mouseover event to change the cursor to a hand. i did a search and

          > couldn't find anything that worked. does anyone know what the syntax would

          > be?

          >

          >

          >

          > ------------ --------- --------- ------

          >

          > Visit http://aiaiai. com for more groups to joinYahoo! Groups Links

          >

          >

          >



          ------------ --------- --------- --------- --------- --------- -



          No virus found in this incoming message.

          Checked by AVG - www.avg.com

          Version: 8.5.409 / Virus Database: 270.13.114/2401 - Release Date: 09/28/09

          17:53:00































          [Non-text portions of this message have been removed]
        • behnam bozorg
          dear friend;   sample :   i want my cursor changes to finger pointer when i roll over (HERE).   code (CSS Solution):   i want my cursor changes to finger
          Message 4 of 9 , Sep 29, 2009
          View Source
          • 0 Attachment
            dear friend;
             
            sample :
             
            i want my cursor changes to finger pointer when i roll over (HERE).
             
            code (CSS Solution):
             
            i want my cursor changes to finger pointer when i roll over <span style="cursor:pointer"> (HERE).</span>

            Code (Javascript Solution):
             
             
            i want my cursor changes to finger pointer when i roll over<span onmouseover="this.style.cursor='pointer'"> (HERE).</span>

            --- On Tue, 9/29/09, David Smart <smartware.consulting@...> wrote:


            From: David Smart <smartware.consulting@...>
            Subject: Re: [JavaScript] onmouseover - I want the cursor to display a 'hand'
            To: JavaScript_Official@yahoogroups.com
            Date: Tuesday, September 29, 2009, 2:33 AM


             



            Did you do a Google search? Plenty of information there.

            Regards, Dave S

            ----- Original Message -----
            From: "tomdcarden" <tomdcarden@yahoo. com>
            To: <JavaScript_Official @yahoogroups. com>
            Sent: Sunday, September 27, 2009 6:29 AM
            Subject: [JavaScript] onmouseover - I want the cursor to display a 'hand'

            > Hi All,
            > my first post here,,..i think?
            >
            > simply trying to do the following,
            >
            > use a mouseover event to change the cursor to a hand. i did a search and
            > couldn't find anything that worked. does anyone know what the syntax would
            > be?
            >
            >
            >
            > ------------ --------- --------- ------
            >
            > Visit http://aiaiai. com for more groups to joinYahoo! Groups Links
            >
            >
            >

            ------------ --------- --------- --------- --------- --------- -

            No virus found in this incoming message.
            Checked by AVG - www.avg.com
            Version: 8.5.409 / Virus Database: 270.13.114/2401 - Release Date: 09/28/09
            17:53:00



















            [Non-text portions of this message have been removed]
          • Rodrigo Cesar Nascimento
            The better way to do this is use cursor CSS syntax: eg.: p.word{cursor: pointer} test 2009/9/26 tomdcarden ... --
            Message 5 of 9 , Sep 29, 2009
            View Source
            • 0 Attachment
              The better way to do this is use cursor CSS syntax:

              eg.:
              p.word{cursor: pointer}
              <p class="word">test</p>

              2009/9/26 tomdcarden <tomdcarden@...>

              >
              >
              > Hi All,
              > my first post here,,..i think?
              >
              > simply trying to do the following,
              >
              > use a mouseover event to change the cursor to a hand. i did a search and
              > couldn't find anything that worked. does anyone know what the syntax would
              > be?
              >
              >
              >



              --
              []'s
              Rodrigo César Costa do Nascimento

              UOW - Up On Web
              http://uponweb.wordpress.com


              Bacharel em Sistemas de Informação


              [Non-text portions of this message have been removed]
            • Ryan Doherty
              You don t need JavaScript to do this: Foo #myDiv:hover { cursor:pointer; } -Ryan ... -- Ryan Doherty [Non-text portions of this message
              Message 6 of 9 , Sep 30, 2009
              View Source
              • 0 Attachment
                You don't need JavaScript to do this:

                <div id="myDiv">Foo</div>

                #myDiv:hover {
                cursor:pointer;
                }

                -Ryan

                On 9/26/09 1:29 PM, tomdcarden wrote:
                >
                > Hi All,
                > my first post here,,..i think?
                >
                > simply trying to do the following,
                >
                > use a mouseover event to change the cursor to a hand. i did a search
                > and couldn't find anything that worked. does anyone know what the
                > syntax would be?
                >
                >

                --
                Ryan Doherty



                [Non-text portions of this message have been removed]
              • Mauricio Rocha
                Ok. I don t really understand why you need in javascript, but here it goes: It does not matter if it is a link tag or anyother, I mean ... You can
                Message 7 of 9 , Oct 6, 2009
                View Source
                • 0 Attachment
                  Ok. I don't really understand why you need in javascript, but here it goes:

                  It does not matter if it is a link tag or anyother, I mean <p> <a> <h1> ...

                  You can use a function, or type everything directly to the tag.

                  I'm using a function, of course the function name does not matter, but you have to repeat inside the tag.

                  <html>
                  <body>
                  <p onmouseover="showHand(this)" onmouseout="hideHand(this)">my paragraph</p>

                  <script type="text/javascript">
                  function showHand(el){
                      el.style.cursor = "pointer";
                  }
                  function hideHand(el){
                      el.style.cursor = "default";
                  }
                  </script>
                  </body>
                  </html>

                  Here, I'm changing the CSS with javascript. There's many ways to do this, I mean with javascript, and javascript frameworks like jquery, prototype, dojo, Yui, etc. The down side is that every browser needs to have javascript enabled for this. And it'll take more resources of the browser/computer otherwise done with CSS alone.




                  --- On Tue, 9/29/09, tomdcarden <tomdcarden@...> wrote:

                  From: tomdcarden <tomdcarden@...>
                  Subject: Re: [JavaScript] onmouseover - I want the cursor to display a 'hand'
                  To: JavaScript_Official@yahoogroups.com
                  Date: Tuesday, September 29, 2009, 12:26 AM






                   





                  Yes, i did, i know how to address with CSS, but couldn't find how to control with JS.

                  i.e, connect the CSS and JS. if you know of anything, please let me know.



                  thank you



                  --- In JavaScript_Official @yahoogroups. com, "David Smart" <smartware.consulti ng@...> wrote:

                  >

                  > Did you do a Google search? Plenty of information there.

                  >

                  > Regards, Dave S

                  >

                  > ----- Original Message -----

                  > From: "tomdcarden" <tomdcarden@ ...>

                  > To: <JavaScript_Official @yahoogroups. com>

                  > Sent: Sunday, September 27, 2009 6:29 AM

                  > Subject: [JavaScript] onmouseover - I want the cursor to display a 'hand'

                  >

                  >

                  > > Hi All,

                  > > my first post here,,..i think?

                  > >

                  > > simply trying to do the following,

                  > >

                  > > use a mouseover event to change the cursor to a hand. i did a search and

                  > > couldn't find anything that worked. does anyone know what the syntax would

                  > > be?

                  > >

                  > >

                  > >

                  > > ------------ --------- --------- ------

                  > >

                  > > Visit http://aiaiai. com for more groups to joinYahoo! Groups Links

                  > >

                  > >

                  > >

                  >

                  >

                  > ------------ --------- --------- --------- --------- --------- -

                  >

                  >

                  >

                  > No virus found in this incoming message.

                  > Checked by AVG - www.avg.com

                  > Version: 8.5.409 / Virus Database: 270.13.114/2401 - Release Date: 09/28/09

                  > 17:53:00

                  >































                  [Non-text portions of this message have been removed]
                Your message has been successfully submitted and would be delivered to recipients shortly.