I have an HTML file that has a set of divs with square "block".
When the page loads, it should take place in the slide for them, and I am trying to use the jQuery animate function for this. However, I am a total naught for jQuery, and I'm getting a bug that is not helping with the tutorial.
This is my code:
$ (document) .ready (function () {$ ("block"). Animate ({margin-top: "1 % "}, {Duration: 200, line: true}};});
.The block style looks like this:
div.block {width: 18%; Swim left; Margin: 1%; Margin-top: -10%; Min height: 120px; }
The error message that is getting the firebug is: "Not available: after Property ID".
So, how do I understand it, and the correct way to get a set of blocks to move "slide-in"? (I ideally want to slide it into one of the fastest succession once in a while.)
Here you need to see it. With JS shutdown it is that you are seeing how the blocks should look after animate.
margin-top
javascript is not a valid identifier by itself, therefore It should be in quotation, such as:
$ (document) .ready (function () {$ ("block"). Chetan ({'margin-top': "1%"} , {Duration: 200, line: true}};});
Or jQuery lets you use cap to mark -
in such a way:
$ (document) ) .ready (function () {$ ("block"). Animate ({margin top: "1%"}, {duration: 200, line: true}};});
Internally, jQuery. As an overall suggestion, since the default for the queue, you can simplify your code on:
$ (function () {$ ("block"). Animate ({'Margin-on': "1%"}, 200);});
Comments
Post a Comment