- This topic has 4 replies, 3 voices, and was last updated 6 years, 6 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Javascript variable for results count
Tagged: javascript
Hi Brian
Its not possible yet.
There is a workaround you can do though.
Inside your results area (the area you defined as your Ajax Container), you can add a hidden input:
<input type="hidden" name="number-of-posts" value="<?php echo $query->found_posts; ?>" id="number-of-posts" />
(Depending on your display method, $query might have a different variable name such as $wp_query)
Then, in your JS sf:ajaxfinish event, you can grab the value like:
var noPosts = $('#number-of-posts').val();
Let me know how you get on.
Thanks