Home › Forums › Calendar Products › Community Events › Clicking "view as" doesn't invoke the drop down
- This topic has 8 replies, 3 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
January 12, 2016 at 10:42 am #1054743
Chris
ParticipantHi gang
Love the product. I’m enjoying it without troubles, EXCEPT…
The problem is the “view as” button functionality on the /events/ page when PootlePress Page Builder is activated.
I’m using PootlePress Page Builder to design / layout some pages and really need to keep that in place / installed.In the interest of getting to the bottom of the conflict, is there anything you can suggest about how that dropdown issue can be resolved?
To demonstrate/ explain the issue, I created this wee video here…
http://www.screencast.com/t/QCas6paf3Thanks in advance for anything you can recommend. (Yes, I’ve also reached out to Pootlepress).
Cheers,
ChrisJanuary 12, 2016 at 11:48 pm #1054994Brook
ParticipantHowdy Chris,
I would love to help you with this. That is likely a JavaScript conflict. Do you know how to debug JavaScript? If so are you seeing any errors in your browser console?
Can you provide a link to the site that I can have a look at the problem with my browser console?
Cheers!
– Brook
January 13, 2016 at 6:52 am #1055276January 13, 2016 at 10:25 pm #1055761Brook
ParticipantHowdy Chris,
It looks like it is the smooth scroll that is interfering. It is taking over the calendar links and swapping them for one of its own. Does Pootle allow you to disable smoothscroll? If not, the following JavaScript will do it for you:
jQuery('a[href*=#]').off('click');Running that in your browser console and you will see the links resume working. If you insert it into the footer of your theme, it should be a permanent fix.
Does that all make sense? Will that work for you? Please let me know.
Cheers!
– Brook
January 14, 2016 at 7:07 am #1056025Chris
ParticipantHi Brook
Thanks for your followthrough, for identifying the problem, and for your check-in on my comfort level with grasping the solution communiqué. You’ve made me feel better about how today is going! 😉 Thanks.
I am not great with JavaScript, so but I gotta start somewhere, right? And I do understand what you’ve proposed and will give that a shot. I’ll keep you posted.
Kind Regards,
ChrisJanuary 14, 2016 at 8:35 pm #1056330Brook
ParticipantI am very happy to be of assistance Chris. 🙂 Definitely let me know how it goes.
- Brook
January 19, 2016 at 9:18 am #1058742Chris
ParticipantHi Brook
Okay, I ran the script in my browser console and do see that it makes the difference. Nice!
But I’m still a bit unclear how best to get that into my theme. I’m a novice at enqueueing scripts. I know it involves the functions.php file in my theme, and that I’m NOT just supposed to paste the aforementioned code into my footer.php file. Would I also have to register the script somehow? If so what other code do I need? You see where I’m going here. 😉
Sorry, if you could suggest how would I best add that to my theme I would be so grateful!
ChrisJanuary 19, 2016 at 11:53 pm #1059000Brook
ParticipantThat’s a good question. Enqueueing scripts is a good practice for theme and plugin developers. The main reason to use the enqueue system is because it prevents plugins/themes from loading the same script twice, and allows the site owner (you) to dequeue and make changes as needed.
Using the enqueue system is generally an unnecessary step for site owners like you in this sort of situation though. You already know this script is not going to be loaded by a third party plugin. And any modifications you need to make like choosing when to enqueue and dequeue you can already do since you are the site owner. So it’s up to you. You can learn the enqueue or just plop it in the footer. Both are good options. 🙂
- Brook
February 18, 2016 at 8:35 am #1076941Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Clicking "view as" doesn't invoke the drop down’ is closed to new replies.
