www.webdeveloper.com
Results 1 to 2 of 2

Thread: how to set multiple style properties of a dom element in one time

  1. #1
    Join Date
    May 2011
    Posts
    2

    Exclamation how to set multiple style properties of a dom element in one time

    I know the atomic way to set style properties of a DOM element like
    domElmnt.style.display="none";

    Is there any way to set multiple properties in the same time? I'd like to spare some cpu time...

    I assume if I use framework like JQuery to set more style props at once that call will be interpreted to the atomic way I described above...

    Am I right with this guess?

  2. #2
    Join Date
    May 2011
    Posts
    2
    Could this work?

    domElmnt.setAttribute("style", "margin: 0; padding: 0;");

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles