Hi! I’m using all the code instructions to create a sticky header. But when I try to connect the strip to the code, I get a flad that indicates that it is not a valid selector for the action I want to take. I can’t seem to figure out the issue here. It doesnt seem to be like a misspelling or anything like that, but Im missing something here.
The screenshot is attached below.
Thanks!
Hello Omri,
could you show the whole code in a text-form (no pic).
You have here in this forum the OPTION to use “CODE-TAGS”.

Try to give the element another ID.
$w.onReady(function () {
//TODO: write your page related code here...
$w("#headerTransitionPoint").onViewportLeave(() =>{
$w("#defaultHeaderStrip").show();
})
});
it is because the element is not attached to the header it is on the page. and he is using site code. so that element cant be found on all of his pages therefore is not a valid selector in the context of site wide code
Also, why isn’t the strip hidden on load (in properties panel) if you want to show it in the code?
might be his design decision, shouldn’t effect how the code runs either way
It may be in site code, but the strip is on the page he that he shows.
Please post the editor URL of your site. Only authorized Wix personnel can get access to your site in the editor. Please include the name of the page involved.
I figured it was related to that, but I couldnt really attach it to the header by just moving the element to the header part with the mouse. Is there another way to do that?
You have to toggle the toggle saying " show on all pages". To see the toggle, right click on the strip.
Yisrael, since the element is on the current page, it shouldn’t return this error because the code from each section evaluate the current displayed elements.
Omri, navigate to another page and get back to this page, try reloading the editor, sometimes this error occurs on slow internet/devices.
@ahmadnasriya , that’s exactly my point. It shouldn’t get that error on this page. Something else is fishy.
Wix is fishy, like todays database problem.
@arthurvalatin thanks! It worked. The code is fine now with no errors. Te only issue now is that I cant seem to find my elements ids in the properties panel. Any idea why?
Arthur, the issue was solved in amatter of minutes, and this issue is caused by local reasons (e.g slow CPU, slow internet or low memory).
You have to click on the strip to see its id
but what about the strips ids? There are 2 strips and they’re not there
sorry, I updated my reply. I am not thinking strait today.
Did you solve your problem?
But why cant i see anything but headr1?arent the strips dis supposed to be there as well?