in functions file :
add_action( ‘wp_enqueue_scripts’, ‘bsp_enqueue_search’ );
function bsp_enqueue_search() {
wp_enqueue_script( ‘bsp_enqueue_search’, plugins_url(‘js/bsp_enqueue_search.js’,dirname( __FILE__ )) );
}
The bsp_enqueue_search.js’ file is
jQuery(document).ready(function($) {
$('#bsp_search_submit1').click(function() {
$('#bsp_search_submit1').hide();
$('#bsp_search_submit2').show();
});
});
If you go to
https://gos.rewweb.co.uk/index/search/
This has the bbpress search and a wordpress search.
and click the bbpress search in the body, then ‘searching’ with a spinner appears. If you click the same in the sidebar ‘Search Forums’ it does not, but it is the same form being called, and all the code is there if you inspect, but the js is clearly not being implemented.
But if you click the WordPress search first, and then click the ‘search forums’ it works
Can anyone assist is resolving – is it some load order issue?
]]>If you load the page and then if you start by clicking the search in the ‘search forums’ – it does not display the ‘searching’ and spinner. But if you click the ‘wordpress search and then click the search forums you will see what I want search forums to do in the sidebar to do.
Thanks again for looking at this
]]>Can you tell me which ID(s) you changed to make this work – I think I am being thick.
Thanks again for your help.
]]>so if you click wordpress search, and then once that has rendered click the widget search, you will see what I want to happen, but without having to have clicked the wordpress search.
]]>