Theme4Press Forums alora how to disable e.preventDefault() on one page? Reply To: how to disable e.preventDefault() on one page?

Paulina Sierzputowska
Post count: 3
#20898 |

I’m sorry, maybe I was not clear, I will try to explain it better. So, in the content of this page there is a map with links to regions and two additional dropdown menus: “Wojew√≥dztwo” and “Certyfikaty”:

The links on the map are the same as the ones in “Wojew√≥dztwo” menu – they should open (on click change display from none to block with CSS) a div/table with the names from this region. “Certyfikaty” menu is similar – it should open a table with only I-st, II-nd or III-rd degree. The links from the map work fine, so they display the proper table, but the links from the dropdown menus don’t do anything.

The links are there, you can open them in new tab/window with the right mouse button, but they won’t display the table on the same page. Before the alora update both the links from the map and from the dropdown menus would do what they were suppose to. Now javascript from the main.js file is blocking them – this is this e.preventDefault() I mentioned in the beginning: line 6662, collapse data-api in the main.js. The problem is that I cannot just replace it in main.js with “return true;”, because it is affecting other pages. I need to block it only on this specific page, to enable default opening of the links on the same page.

And there is no javascript error simply because there is no javascript in the page content- I removed the one I put there before, because it was not working… As I said, I tried to look for some solution/script on the forums, but most of them are changing the javascript file, and that I don’t want to do, because I don’t want to break other things in the process;) I don’t know javascript enough to be able to write the code on my own and would really appreciate your help with that…

Thank you –