BuddyBoss Home – Web › Support Forums › Themes › BuddyBoss theme › Responsive Dropdowns call function
- This topic has 7 replies, 2 contibutors, and was last updated 9 years, 7 months ago by Nicola.
Question
April 4, 2015 at 2:45 pm #38520@nicolacirottoHi,
I have created child theme of buddyboss theme and I put inside html some dropdown object with ajax
When I’m in mobile size, the dropdowns added with ajax are not showed correctly (not stilized) I think because I need to call a java function for Responsive Dropdowns.
How I can solve this?thanks
Answers
April 5, 2015 at 10:19 am #38536@
Anonymoushi @nicolacirotto Ajax calls are already part of core buddypress and there are lots of ajax based actions all work fine, you can pm me what exact approach you are using might be it need some quick fix.
Regards
Varun DubeyApril 5, 2015 at 1:14 pm #38539@nicolacirottoI wrote a plugin Country, Region, City for users.
When user choose a country I put with ajax the regions in dropdown list. But in mobile visualization the select is not stylized because don’t have the class etc…
I saw in buddyboss.js there are init_select() javascript function that add to all dropdown the class to stylize it but I can’t call this function. I don’t understand how I can call it.If you tell me how I can call this function, I can call after the success ajax call and your function adjust the style of added dropdown.
Thanks
April 10, 2015 at 12:48 pm #38761@nicolacirottosome news?? :S
April 11, 2015 at 1:29 am #38784@
Anonymoushello @nicolacirotto , the approach you need to apply for your issue is to create Region,city select dropdown with no ( blank )options in it by default. when you create these dropdown from starting it will automatically get converted to there design then you have to only populate the options generated according to the country selected in the select dropdown using select dropdown box id.
Regards
Varun DubeyApril 12, 2015 at 6:10 am #38825@nicolacirottoit is not possible because I add city dropdown only if I choose a region and I add region dropdown only if I select a state.
Ok, I search another way if it is not possible to launch your js function.
ThanksApril 12, 2015 at 8:28 am #38831@
Anonymoushi @nicolacirotto, init_select() look of each and every select box available and apply the effect on it, at above suggestion did not work, i hope it will be better to create a same js for you to execute for your select options.
Regards
Varun DubeyApril 12, 2015 at 9:04 am #38832@nicolacirottoI already thinked about this solution but I don’t like because in every buddyboss update I need to go to see if init_select() and populate_select_label() are changed.
But now I have duplicated the init_select() and populate_select_label() out of “var BuddyBossMain” in buddyboss.js and it work. Now in every buddyboss update I will go to see if are changed :S
- The question ‘Responsive Dropdowns call function’ is closed to new replies.