BuddyBoss Home – Web › Support Forums › Themes › BuddyBoss theme › The theme ads by default a div wrapper to select elements
Tagged: select wrapper theme
- This topic has 1 reply, 2 contibutors, and was last updated 8 years, 10 months ago by Anonymous.
Viewing 2 posts - 1 through 2 (of 2 total)
Question
January 18, 2016 at 1:28 pm #56578@karlosHello,
The theme ads by default a div wrapper to select elements:
div.buddyboss-select
div.buddyboss-select-inner
and also ads ads
<span style=”display: inline”>I think it looks great! But I just don’t need this for what I need to accomplish.
How can I prevent the theme from adding those wrappers? The website is oigente.com and if you visit it from a phone or resize the browser you will see.
Thank you!
Answers
January 23, 2016 at 4:52 am #56968@
AnonymousHi @karlos
it is added inside
buddyboss/js/buddyboss.js initialed as init_select()
you can modify and overide inside the child themefunction init_select() { var current = 0; $selects = $('#page select:not([multiple]):not(#activity-privacy):not(.bp-ap-selectbox)'); $selects.each( function() { var $select = $(this), $wrap, id, $span, $label, dynamic = false; if ( this.style.display === 'none' ) { return; } $wrap = $('<div class="buddyboss-select"></div>'); if($(this).hasClass('large')) { $wrap = $('<div class="buddyboss-select large"></div>'); } id = this.getAttribute('id') || 'buddyboss-select-' + current; $span = $select.prev('span'); $select.wrap( $wrap ); $inner_wrap = $('<div class="buddyboss-select-inner"></div>'); $select.wrap( $inner_wrap ); if ( ! $span.length ) { $span = $('<span></span>').hide(); dynamic = true; } $span.insertBefore( $select ); // Set data on select element to use later $select.data( 'buddyboss-select-info', { state: 'init', dynamic: dynamic, $wrap: $wrap, $label: $span, orig_text: $span.text() } ); // On select change, repopulate label $select.on( 'change', function( e ) { populate_select_label(); }); }); }
You can remove it
Regards
Viewing 2 posts - 1 through 2 (of 2 total)
- The question ‘The theme ads by default a div wrapper to select elements’ is closed to new replies.