Home › Forums › JavaScript › Flashlight Javascript or jquery pluggin
- This topic is empty.
-
AuthorPosts
-
December 17, 2014 at 12:10 pm #191088chauhanheenaParticipant
Hi,
I’m looking for a snippet or a pluggin where
when i click a link/button,
the cursor changes to a custom cursor on the mouse down event and then returns to the default.when i click the link, a flash light appears on the screen. Like the camera flash light with the click sound.
Could someone help me with the code?
thanks
December 17, 2014 at 12:54 pm #191092chauhanheenaParticipantHi @Shikkedeil
please visit my website and from there i can explain what i exactly wish to do and if u could help me out
http://www.goldensprocketzmedia.com/BlackTheme
when i click on any of the links,
the cursor should change to a new custom cursor (
on mouse down event, and the entire screen should flash for a second (like the camera flash) .i already have addded the code for sound.
Please let me know the code for this. if u can figure this outthanks so much
December 17, 2014 at 2:05 pm #191098chauhanheenaParticipantThanks @shikkediel
Ishall try this code n hopefully its gonna work great. will keep you posted… thanks so much.
also i had another problem.
when i open the site in IE.
if u notice there is a weird behaviour of the custom cursor. if i move the cursor to any of the clickable elements, the cursor disappears and reappears only on a sligh mouse move. Any idea why this is happening.the following is the code im usinig
a, a:hover{cursor: url(../../../../cursors/camera.png), /* Modern – relative to the document /
url(cursors/camera.cur), / IE – relative to the root /
default !important; / Built-in fallback /} /new line added*/this works perfect with chrome and firefox. but with IE i see the weird behaviour.
Ifyou could help
thanks
December 17, 2014 at 2:27 pm #191103chauhanheenaParticipantgonna try ur code in some time..will keep you posted on this one for surel :)
thanksDecember 17, 2014 at 3:43 pm #191107chauhanheenaParticipantThe code dint work as expected.
the cursor does not change. the sound does play and the flash too does not work as expected. :( I did twist the code a bit n itworked. but IE gives problems.December 18, 2014 at 2:08 am #191127chauhanheenaParticipant<!–flash light –>
<script type=’text/javascript’>//<![CDATA[
$(window).load(function(){
$(‘.innerlink’).click(function() {
$(“.pane”).fadeOut(0).delay(0).fadeIn(0);
});
});//]]>
</script>worked for flash. n it works well now :)
but the cursor code for some reason does not work well. When i click it changes to default arrow cursor and back to the current custom cursor. not as mentioned in the code (to cross hair and back to pointer. I’m actually using a custom cursor n on mouse down i want to use another custom cursor and onmouse up back to the original custom cursor. thats what im trying to do.
December 18, 2014 at 9:45 am #191147chauhanheenaParticipantwhat im now doin is
$('a').one('mouseover', function() { $(this).css('cursor', 'url(cursors/camera.png),url(cursors/camera.cur),default'); }); $('a').on('mousedown', function() { $(this).css('cursor', 'url(cursors/camera1.png),url(cursors/camera1.cur),default'); }); $('a').one('mouseup', function() { $(this).css('cursor', 'url(cursors/camera.png),url(cursors/camera.cur),default'); });n whats happens is the following
the first time i click the link, it works good. the second time i click the same link, the mouseup does not happen and the third time i hover the link, the mouse down cursor is seen. please take a look.
December 18, 2014 at 9:50 am #191167Paulie_DMember -
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.