What is wrong with this if statement?

What is wrong with this if statement?

  1. $(document).ready(function () {
  2.       $('#mycarousel-next').click(function () {
  3.       var z = $("ul.jcarousel-list-horizontal").css('left');
  4.       if (z == 0) {
  5.       alert(z);
  6.       }
  7. });
  8. });


Doesn't ever alert.

However every click this does.

  1. $(document).ready(function () {
  2.       $('#mycarousel-next').click(function () {
  3.       var z = $("ul.jcarousel-list-horizontal").css('left');
  4.       if (0 == 0) {
  5.       alert(z);
  6.       }
  7. });
  8. });


What am I doing wrong with the first statement?