Here is my fiddle link
I guess my question is clear by title itself. Still, what I am looking for is an way to bind click event on the image added using css
click
Something like this appears to also work:
$('.cross').click(function(e) { var mousePosInElement = e.pageX - $(this).position().left; if (mousePosInElement > $(this).width()) { $(this).val(''); } });
Link to example