[Solved] Move element to X left when click button [closed]


It looks like you have a container where the width of the content inside is wider. If I understand your question properly, you want to have left/right buttons to essentially slide back and forth to reveal what’s hidden.

Using jQuery’s .animate() method, you can slide the table itself left and right. The example below is based strictly on your markup. Only difference being that I added the html elements for the left and right buttons, and I added position: relative; to the .Pro CSS class:

http://jsfiddle.net/lasha/8Zjza/

var $container = $(".proPartners");
var widthOfContainer = $container.width();
var $table = $(".Pro");
$(".right").on("click", function (e) {
    $table.animate({
        left: "-=" + widthOfContainer
    }, 300);
});
$(".leftpro").on("click", function (e) {
    $table.animate({
        left: "+=" + widthOfContainer
    }, 300);
});

3

solved Move element to X left when click button [closed]