I would like to know if there exists a way to modify the attributes of an element (for example a select) using a JsCmd in lift.
Here the working version I have for now, running the javascript string.
Run("document.getElementById(\"select_id\").setAttribute(\"width\", \"30px\");")
Thanks in advance.
You can use the JqJE library included in Lift which provides a programatic wrapper around JQuery.
The following snippet will create a link that will set the
widthattribute of#select_idto30pxwhen clicked.This code snippet provides a full example: https://gist.github.com/725432