1

i have this code and it worke five minutes ago , when i restart my app it does not work , i don't know whyyyyyy :

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script>
        $(document).click(function () { 


            var div = $('.idbody');
            div.animate({ top: '20%' }, "slow"); 
            });

    </script>

<div class="idbody">
.............My html code ............
</div>

thank you

mitsu
  • 429
  • 2
  • 10
  • 23

3 Answers3

4

Try this:

HTML Code:

<div class="idbody">.............My html code ............</div>

CSS Code:

.idbody
        {
            background: url(images/fondbodyrepeatos.png) repeat;
            width: 400px;
            height: 250px;
            position: absolute;
            top: -50%;
            left: 32%;
            box-shadow: 1px 1px 35px #014668;
            border-radius: 10px;
            padding-left: 5%;
        }

Jquery Code:

$(document).ready(function () {
    $(document).click(function () {
        var div = $('.idbody');
        $('div').animate({
            top: '+=20%'
            }, 'slow', function() {
            // Animation complete.
        });
    });
});

DEMO

RealDeepak
  • 823
  • 6
  • 9
0

It probably because of the problem with your internet connection. Try download the jquery file and keep it locally. save this file jquery

Anoop Joshi P
  • 25,373
  • 8
  • 32
  • 53
0

ITTT WOOOORK .....with your code and i added this files :

<script src="Script/jquery-1.10.2.js" type="text/javascript"></script>
<script src="Script/_jquery-2.0.2.js" type="text/javascript"></script>
mitsu
  • 429
  • 2
  • 10
  • 23