Designs Advice » Scripts

Script.aculo.us Dom Builder className

Tags:

4 posts repliesLatest post: 3 years by idesign

  • This topic is not resolved
    1. idesign

      Member

      Anyone use Script.aculo.us Dom Builder before. I'm having problems with the className attribute. It's supposed to assign a class to the element you are creating with the Dom builder, which it does (FireFox's dom inspector proves it). But the css style with that class name does not get applied. Do css styles get applied to dynamically created elements?

      Posted 3 years ago # Link
    2. blackstudio

      Member

      Yes the css styles should be getting applied to those elements. I haven't used the Dom builder before, but I have dynamicaly created html elements using javascript and the styles are always applied.

      Posted 3 years ago # Link
    3. idesign

      Member

      Yeah, it's not getting applied. I don't know why. Rackn' my brain. I'll try looking into it tomorrow I guess.

      Posted 3 years ago # Link
    4. idesign

      Member

      heres a snippet of code

      element = Builder.node('div',{id:'newProjPanel'+String(projNum),className:'projectPanelcss',style:'display:none;width:85%;margin:4px 0 4px 0;padding:5px;background-color:#EEE;position:relative;'},[
      Builder.node('a',{onclick:"Effect.SlideUp('newProjPanel"+String(projNum)+"',{duration:0.5,afterFinish: deleteElements});",style:'z-index:'+String(projNum+1)+';position:absolute;top:0;right:0;'},[
      Builder.node('img',{src:'images/delete.gif'})
      ])]);

      Posted 3 years ago # Link

    RSS feed for this topic

    Reply

    You must log in to post.