Hello! I'm trying to do something, but without sucess.
How to do a vertical and horizontal line centered on mouse pointer, but using javascript?
Anyone knows any code that do this? Or where can I find it?
I will appreciate any help.
Thanks! :D
Alan
Printable View
Hello! I'm trying to do something, but without sucess.
How to do a vertical and horizontal line centered on mouse pointer, but using javascript?
Anyone knows any code that do this? Or where can I find it?
I will appreciate any help.
Thanks! :D
Alan
edit: i don't know why but i didnt get the part of the mouse pointer.. but css would be enough
Edit: didn't notice you're new, welcome to the forums :)
if you got what you needed then please mark the thread as resolved by going to thread tools and mark thread as resolved.
I assume you mean like having a crosshair cursor.
If you Google "Crosshair cursor + javascript", you'll find tons of examples on how to do what you need.
For example: http://www.webtoolkit.info/javascrip...om-cursor.html
Ugh, folks - CSS! Javascript should only ever happen for things you can't do with ordinary markup and styling.
Are you familiar with CSS, iuky? If not, I will definitely explain the above in more depth.Code:body{cursor:crosshair;}
I had always thought the cursor property didn't work in Firefox, but looking into it I can't find any documentation on that.
Do you know if there was ever an issue for it? I coulda swore there was once upon a time.
*edit* ah, it seems it is only for certain values that it fails. Crosshair is one that works across all browsers.
only custom cursors don't work, the system cursors will work, i mean those who are selected as default for pointer, link, crosshair... whatever..
Well, not just a small crosshair, but a vertical and horizontal line, centered on mouse cursor, that extends until touch the web page's borders.
It's is a lot useful in grid pages when you have a lot of scheduled activities on rows and dates on columns.
Thanks guys! :D