Possible to change the dialog right position in the style to the new value in jquery?

Just wandering will it be possible to change the dialog right position in the style to the new value in jquery?

Example:

I have the following dialog loaded on the page with the following set of style value:

<dialog class="mdl-dialog test" style="padding:0px;position:absolute;top:340px;right:183px;margin-right:0">
</dialog >

Any way that I can change the dialog right position in the style to the new value in jquery as following :

<dialog class="mdl-dialog test" style="padding:0px;position:absolute;top:340px;right:1403px;margin-right:0">
</dialog >

Answers 1

  • $('.mdl-dialog').css('right', '1403px') should do it for you. The css function alters the style attribute on the selected elements.


Related Articles