November 09, 2016
This is a great way to get trigger content loading on the page automatically. Visitors can then use filters enabled in the Search Filter to customize their search.
Place the below function within script tags before the closing </body> element. This will target all UWPQSF forms by ID and load their content automatically.
jQuery(document).ready(function($) { $('[id^=tdp-] option[value="<?php echo $select_value?>"]').attr("selected", "selected"); function loadAjax(){ var obj = $("[id^=uwpqsffrom_]");//remember to replace the form id process_data(obj); return false; } window.onload = loadAjax; });
Sourced here.