toggle not working with .on()
<p>i am trying to toggle a comment show or hide system .in which i updated by code to new jquery on . but it seems it does not work, can anyone suggest me where i am wrong . Here is my code</p>

<pre><code>$(document).on('toggle', '.rpwrap', function(){
var ID = $(this).attr("id");
if($("#commentcontainer"+ID).css('display') === 'none'){

$("#commentcontainer"+ID).show();
$("#likepanel"+ID).css('display','none');
}
else
{
$("#commentcontainer"+ID).hide();
$("#likepanel"+ID).css('display','none');
}     
    },
    function(){
    var ID = $(this).attr("id");
if($("#commentcontainer"+ID).css('display') === 'block'){
$("#commentcontainer"+ID).hide();
$("#likepanel"+ID).css('display','none');

}
else
{
$("#commentcontainer"+ID).show();
$("#likepanel"+ID).css('display','none');
}   

});
</code></pre>
