I have a Wordpress page with a text widget containing a select
dropdown menu, along with a JQuery function to scroll to an id of a dl
element in a separate content widget on the same page. The dl
elements are contained within separate columns on a different widget. Here is my function:
<select id="select">
<option value="">Select an option</option>
<option value="londonderry">Amherst</option>
</select>
<script>
jQuery("#select").on('click', function() {
alert(this.value);
jQuery('html, body').animate({
scrollTop: jQuery("#" + this.value).offset().top
}, 2000);
});
</script>
As content is spread over multiple columns, I just can't place the dropdown menu in one of the columns; placing the code in the header of the widget with the columns wraps it in paragraph tags. Any ideas on why this is not working?
How to access array index of Cloud Firestore using query in Flutter?
Getting an unwanted space between Nav Items in Navbar Angular
PHP Script INSERT INTO SELECT does not insert, with no errors [closed]
SQL query to select students who have taken all subjects from subjects table
Displaying Dynamic placeholder content on Textbox in ReactJS
Extracting Parameters from Redirect URI - QuickBooks API / Python
How to check if a function is running in worker thread in node?
I have a function the parameter has more than one values which I'm passing them after a loopI want to use the values Im getting to replace integers in a string by there older
I have a Menu-list, and when I pass the mouse hover an item display another list, but this list is larger and change the height of the documentThis create a bug in the page
I am creating a horizontal scroller that you can click to scroll through images and everything scrolls fine, but I am not sure how I get the scroller to stop at the last pictureWhat I was trying to do was stop it at a certain pixel width but that is inconsistent
I am building a simple app in ReactJS that works with a JSON array by calling a certain APII am then populating the results of the array in a table