Falling Snow & Not Allowed Right Click On Web Page !

Discussion in 'JavaScript' started by ~Maria~, Dec 29, 2010.

  1. #1
    Hi every body,
    i need two java codes.

    1.Falling snow on the web page.
    2.Don't allow right click on the web page to visitors.


    Please give me these codes and tell me how to use them.
     
    ~Maria~, Dec 29, 2010 IP
  2. roxcon

    roxcon Member

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    use jquery for disable right click you can use this code snippet
    and snow fall you can use jquery pluggin try this link
    http://plugins.jquery.com/plugin-tags/falling-snow
     
    roxcon, Dec 29, 2010 IP
  3. roxcon

    roxcon Member

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    if you want to put snow effect for whole site? add those jSnow jscript file to head section and put this code in script tag
    $(document).snowfall();
    there are configuration option on the link posted
     
    roxcon, Dec 29, 2010 IP
  4. ~Maria~

    ~Maria~ Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i didn't understand, please tell me complete detail with complete html codes.
     
    ~Maria~, Dec 30, 2010 IP
  5. roxcon

    roxcon Member

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>jSnow Example</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
    <script type="text/javascript" src="jsnow.js"></script>

    <style type="text/css">
    html,body {background:#000;position:relative;padding:0;margin:0;}
    #body {background:#333;margin:0 auto;width:700px;color:#ccc;padding:0 20px 10px 20px;}
    a {color:#ff0;}
    #example {color:#fff;}
    </style>
    <script type="text/javascript">
    $(function() {
    $().jSnow();
    });
    </script>
    </head>

    <body style="height:800px;">

    </body>
    </html>
     
    roxcon, Dec 31, 2010 IP
  6. ~Maria~

    ~Maria~ Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Both code are not working.
     
    ~Maria~, Dec 31, 2010 IP
  7. roxcon

    roxcon Member

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #7
    no it's work

    1. add jquery javascript file (use script tag head section)
    2. then add snow/js file (use script tag head section)
     
    roxcon, Jan 2, 2011 IP
  8. ~Maria~

    ~Maria~ Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    i did, but not working. Please somebody help.
     
    ~Maria~, Jan 3, 2011 IP
  9. roxcon

    roxcon Member

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #9
    you should follow basic javascript tutorial before add code in to your site. seems to be you don't have any idea how to add separate client script to web page i suggest you go to w3school learn about javascript otherwise no one can help with this problem all this code work perfect and i tested them on my own
     
    roxcon, Jan 4, 2011 IP