Forums

Give help. Get help.

  • # July 11, 2017 at 6:41 am

    I want to prepend a disclaimer above the ads on my website. The host I am using makes it impossible to edit the HTML source to add it. The text I am working with includes the use of both a paragraph tag and an anchor tag. I would prefer to use only JavaScript, as the host doesn’t seem to do well with JQuery. Is there a way to prepend HTML text only using JavaScript?

    # July 11, 2017 at 11:19 pm

    Look here for an example how to insert an element before others: https://codepen.io/jeroenreijs/pen/NgeaXJ

    # July 12, 2017 at 5:15 am

    How can I include styling with that? Is there a way I can include an ID or a Class or even style it inline?

    # July 12, 2017 at 7:58 am

    You can use setAttribute() for that. I have changed the pen. For example: p.setAttribute('id','yourid');.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag