bp_add_custom_style_selectbox

The BuddyPress Activity Privacy bp add custom style selectbox function.

Description

bp_add_custom_style_selectbox(); 

Usage

  1. if ( !function_exists( 'bp_add_custom_style_selectbox' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-activity-privacy/includes/bp-activity-privacy-actions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_add_custom_style_selectbox(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/bp-activity-privacy-actions.php  
  1. function bp_add_custom_style_selectbox() { 
  2. ?> 
  3. <script type="text/javascript"> 
  4. if ( typeof jq == "undefined" ) 
  5. var jq = jQuery;  
  6. jq(document).ready( function() { 
  7. if (jq.isFunction(jq.fn.customSelect)) {  
  8. //if ( jq.isFunction(jq.fn.customStyle) ) {  
  9. //fix width problem 
  10. //http://stackoverflow.com/questions/6132141/jquery-why-does-width-sometimes-return-0-after-inserting-elements-with-html 
  11. setTimeout(function() { 
  12. jq('select.bp-ap-selectbox').customSelect(); 
  13. //jq('select.bp-ap-selectbox').customStyle(2); 
  14. }); 
  15. }); 
  16. </script> 
  17. <?php