jquery $(this).data selecter : **view**

    echo '<div class="carousel-inner">';
    echo '<div class="item active">';
    echo'<h4>' . $vid->VIDEO_NAME . '</h4>';
    echo'<input type="text" class="" data-primary="' . $vid->ID . '" value="' . $vid->ID . '">';
    echo '<video width="500" height="281" controls>';
    echo '<source src="' . base_url() . $vid->VIDEO_URL . '" type="video/mp4">';
    echo 'Your browser does not support the video tag.';
    echo '</video>';
    echo '</div>';
    echo '</div>';
    echo '</div>';
**script**

    //rate videos start
    $('[value="bad"]').click(function (e) {
    console.log($(this));
    lert($(this).data("primary"));
    });
I'm try to get the ID of each video element but results comes as undefined. Any help there?????

