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