jQuery toggle/hide/show etc. div using variables $('.get-delete').click(function() { var get_id = $(this).attr('id'); $("#" + get_id ).toggle(400); });