Hi I am having problems with retreiving range values in the back end of wordpress. So the ideal situation is that I have a box on the edit page screen which size would be dictated by the value of the range slider or number on the same page. So whenever you move the slider the box will move.
Whenever i check the code it doesn’t look like the slider value changes until the page is updated. Then I also made a jquery check for when the number in the text field changes, that doesnt work either. I feel like I am missing something but i just dont know what.
The reason why the old code is not working is that $('#range-id input[type=number]') may not exist on the page when you are looking for it. In this case it is just not there on $(document).ready. When elements are added dynamically with JS instead of adding the action to the element you need to add the action to the document with the selector target.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users