djibe / material

Material Design 2 for Bootstrap 4 (active fork of Daemonite Material)
https://djibe.github.io/material/
MIT License
68 stars 11 forks source link

Closest not available in IE #23

Closed lgemeinhardt closed 3 years ago

lgemeinhardt commented 3 years ago

Closest not available in IE - use jQuery version of closest and retrieve the original element back - using get(0)

Fixes #22

djibe commented 3 years ago

A cool 2nd PR :D

I dream of leaving jQuery behind and BS5 does the same. What do you think of a polyfill instead ?

https://developer.mozilla.org/fr/docs/Web/API/Element/closest

See you soon.

lgemeinhardt commented 3 years ago

I think a polyfill is for sure an option, but currently jQuery is too much in use ... only for the closest function we have the following usages: 2x expansion-panel.js 1x floating-label.js 3x tab-switch.js I think another jQuery closest usage is quite inline with the other code and not an exception.

What do you think? Btw. very cool material design library for bootstrap! :-)