Streaming live at 10am (PST)

Load section on drop down selection


#1

Howdy y'all!

I'm looking for a bit of advice and I'm expecting a delightful code snippet too.

On one of my websites I want to be able to load different sections based on the users selection from a drop down list. The example is here:

www.ninjaacademy.co.uk/bookings

What I have done is use interactions to hide the sections and only reveal them once the user has made a selection from the drop down list. The issue I am having though is each section runs a bit of embedded script that calls a booking form from rezdy. So when the page loads all of these booking forms load at one (behind the scenes) and its causing the page to be sluggish.

Is there a way of only running these scripts once the user has made their selection from the drop down list?


#2

Hi @Godweeno, thanks for the question. To help faster with this, could you update your post with some more information? Things like your read-only link, and screenshots of the elements having interactions will be helpful smile

Posting guidelines can be found here: http://forum.webflow.com/t/posting-guidelines-for-the-need-help-category/8094

Thanks in advance! smile
Regards,
Dave


#3

Hey @cyberdave sorry for the late reply for this, I've been pretty busy with work confused

Here is the read only link:
https://preview.webflow.com/preview/ninja-academy-snowboarding?preview=1247af5959c1f483aad0faba064de31f

You will have to navigate to the page called 'Bookings' to see what I mean.

Cheers!


#4

Hm I m not sure if that will work.

But you could try to give each list item within the "dropdown" a unique ID.
E.g. "Learn to Snowboard" gets #learntosnowboard.

Then enter this within the "Custom Code" Footer area on your site:
(dont forget the script tags)

$("#learntosnowboard").click(function(){
  $.getScript("https://ninjaacademysnowboarding.rezdy.com/pluginJs");
});

Rince and repeat that for every other dropdown link and remove the code from the "Embed Settings" widget.

MAYBE it will work. But I m not quite sure.
On the other hand if it was loaded once, it will always be there? Wont it?

Just my 2 cents. I have no deeper information or any clues how to call the actual content just with the dropdown selection.

Regards
Daniel


#5

Thanks @Daniel_Schultheiss I'll try giving that a go and see how it works out. I think coupled with an interaction the forms should still disappear on selection of another from the drop down list. I'll report back with what happens smiley


#6

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.