Ayman Nedjmeddine Ayman Nedjmeddine - 3 years ago 116
Javascript Question

How to deal with DOM elements?

I am learning about writing custom JavaScript for my Odoo 10 addons.

I've written the following piece of code:

odoo.define('ioio.io', function(require) {
'use strict'

const e = $('div.o_sub_menu_footer')

// the "Powered by Odoo" down the secondary menu

The code is well loaded and I can see my testing string in the console.

However when this code is being loaded before the target
, so
empty/not yet filled and thus its content is not removed.

Doing it manually from the console works.

My question is what is the right way to do that? And how to know exactly when the code gets executed?

Answer Source

You can

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download