Need Latest Search Query text as the Title of the search page
I have requirement where i need Page Tilte as the Search term of the Search page.
I tried using
$("#search").coveo('state', 'q'); which is working fine on keypress on search box and also in double click of the search button.
But on single click of the search button in search box the value is not getting updated in
Is there any other way to achieve this?
If I had to guess, I'd say that the problem is the event you're using to intercept clicks on the button. If your code is fired before ours, the state won't be updated when you look at it.
You might want to try using the
buildingQuery event from our own framework if you want something to execute before each query.