Is there any additional advantage of using jQuery UI Position, instead of CSS, apart from perhaps being easier?
I’m developing a client-side web app, where most of the elements are absolute positioned, and trying to figure out if jQuery Position would provide me with, let’s say, better browser compatibility, or additional functionalities that are harder to achieve with CSS.
Being easier to use can be a feature in itself.
Technically, there is no additional browser compatibility involved in the Position plugin, as everything necessary is already provided by the jQuery core. However, pure CSS positioning only allows one to place an element relatively to its default position (
position: relative), or relatively to its nearest positioned ancestor (position: absolute).The Position plugin offers more flexibility: elements can be positioned relatively to the document, the window, any other element, or even the mouse pointer itself. All the complex computations necessary to implement this are abstracted by the plugin. So, I would not dismiss it as redundant, as I believe it indeed provides quite a few advantages.