Error Target Element Id


i would like to run javascript in order to hide an element by targeting his ID with this code

var step = $("#step-1");
console.log(step) ;

It return “a.fn.init {}”

I tried with getElementById, an it says that the element is null

But when i put this code directly in console it works well…

Any idea?


This topic was automatically closed after 70 days. New replies are no longer allowed.