Jquery Click Event On Select Element Not Working As Desired On Chrome 54 June 29, 2023 Post a Comment I have this code: HTML 1 columnSolution 1: You should use change event instead of clickJust change the event in your JS. The updated code looks like $('[name=footerLayout]').change(function() { var selector = ".column-" + $(this).val(); //Create selector $(".column").not(selector).hide(); //Hide others $(selector).show(); //Show column based on selected value }); CopySee the working fiddle https://jsfiddle.net/mk425srx/2/UpdateThe reason of click event not working as expected is because of, click event get fired when the element is clicked but change event is fired after the value get changed. So click event is fired earlier and before the value selection is changed. That's why click event shouldn't be used to detect change of value.To be clear about this, try the following code to see the fact.$('[name=footerLayout]').change(function() { console.log($(this).val()); }); $('[name=footerLayout]').click(function() { console.log('clicked'); }); CopyFiddle link: https://jsfiddle.net/mk425srx/3/ Share Post a Comment for "Jquery Click Event On Select Element Not Working As Desired On Chrome 54" Top Question Show/hide Div Section Based On Where The Page Is Redirected From? I have two php files which redirect like this `header('… SetInterval Slows Down With Tab/window Inactive I build a web app and I use setInterval with 500ms timer fo… Compare Two Arrays Based On Length: Skip Empty Values I have a form with 4 input (can be even many more) where th… Weird Behavior Of Long Presses In Chrome And Firefox For Android So, I found some weird behavior of long presses in Chrome a… JavaScript: How To Force Image() Not To Use The Browser Cache? If I load the nextimg URL manually in the browser, it gives… How Do Js Animations Work? Im trying to understand how to make a javascript animation … Extracting Data From Json Object In JQuery Or JS I want to use the currency data provided by https://raw.git… Show/hide Form Contents Based On Radio Selections Im building a form that has conditional fields that need to… JavaScript Selector By Class Prefix? in CSS, we can select multiple classes with same prefix lik… JQuery - Renaming Checkboxes Sets Consecutively I'm trying to build a form to allow multiple elements (… December 2024 (1) November 2024 (40) October 2024 (69) September 2024 (19) August 2024 (217) July 2024 (200) June 2024 (430) May 2024 (699) April 2024 (479) March 2024 (930) February 2024 (970) January 2024 (882) December 2023 (877) November 2023 (398) October 2023 (557) September 2023 (288) August 2023 (334) July 2023 (272) June 2023 (379) May 2023 (231) April 2023 (134) March 2023 (142) February 2023 (163) January 2023 (287) December 2022 (132) November 2022 (231) October 2022 (175) September 2022 (162) August 2022 (501) July 2022 (304) June 2022 (313) Menu Halaman Statis Beranda © 2022 - JavaScript Guide