0

I am trying to slide an image left using jquery animate with the easing plugin and it doesn't seem to want to work.

I have an image with the id=1 and the following javascript

$(document).ready(function() {
    $('#center-photo img:first').show();
$('#next').click(function() {
    var active = $('#center-photo img:first');
    //Slider Animation
    $('#1')
    .animate(
    { left: 200 }, {
     duration: 'slow',
     easing: 'easeOutBounce'
    })
   .animate(
    { left: 0 }, {
     duration: 'slow',
     easing: 'easeOutBounce'
    });

});
});

next is the link I click to do the animation.

Steven
  • 13,250
  • 33
  • 95
  • 147

1 Answers1

4

First

What are valid values for the id attribute in HTML?
ID's CANNOT START WITH A DIGIT
It will screw up validation as well as mess with the way browsers parse your html

Second What is the position of your image with the id of 1.

A common problem with element positioning is normally when it is defaulted to static try changing the position to relative or absolute.

Community
  • 1
  • 1
austinbv
  • 9,297
  • 6
  • 50
  • 82