Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I bind an event to the clear x button icon in internet explorer (see pic)

I've found that the little x icon in IE 9 and lower does not bind to any of my jquery events like it does in IE 10 (and better browsers like chrome). This is the x icon I'm talking about:

enter image description here

Is there a way I can manually bind this little x icon? I've seen lots of posts on how to hide the x button using css like this:

<style type="text/css">
  ::-ms-clear {
    display: none;
  }
</style>

but I actually wont to bind a click event to this thing. can it be done?

like image 762
DannyD Avatar asked Nov 12 '22 23:11

DannyD


1 Answers

It's not possible to bind to pseudo elements. You can however create a div and position it absolutely over top of it and then bind to that. That should stop the user from clicking the actual x.

like image 149
Lost Left Stack Avatar answered Nov 15 '22 05:11

Lost Left Stack