I couldn't find any JS solution that is more robust than what I already did using .attribute. jQuery's .css method also returns the computer value in px. The closest I could find was a suggestion in StackOverflow [1] to use document.styleSheets, but that wouldn't work in my case, because that is a style attribute and not a style sheet.
[1] http://stackoverflow.com/questions/744319/get-css-rules-percentage-value-in-jquery -- Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי http://aharoni.wordpress.com “We're living in pieces, I want to live in peace.” – T. Moore 2014/1/15 Željko Filipin <[email protected]> > On Tue, Jan 14, 2014 at 8:59 PM, Amir E. Aharoni < > [email protected]> wrote: > >> Surprisingly, this didn't work: It seems to return the computed value in >> px, rather than the specified CSS value in %. > > > Can you get the value in percent using JavaScript? > > Željko > > _______________________________________________ > QA mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/qa > >
_______________________________________________ QA mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/qa
