UK-1991 0 Posting Whiz
$(window).resize(function() {
var y = screen.width;   
if ( y >= 767){
$(window).scroll(function(){
  var x = $(this).scrollTop(),
      transY = (x * 0.3), scale = 1 + (x * 0.00003),
      transform = 'translateY('+transY+'px) scale('+scale+') translate3d(0,0,0)';
  $('#banner .col-sm-6 img').css({
    opacity: 1 - (x * 0.0008),
    WebkitTransform: transform,
    MozTransform: transform,
    msTransform: transform,
    transform: transform
  });
});
}
else{
    }
});

When i resize the browser once the code runs perfectly but when i resize it again it dosent work on second time please help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.