HUZZAH!πππ After some more testing I figured it out!
The problem wasn’t with my IF statement, it was that there was nothing registering the change to the field to trigger the IF statement. Also, I apparently didn’t need that extra variable in there… ANYWAY, this is what worked:
jQuery(function ($) { var total = $(':input[name=input_5]'); total.change(function() { if (total.val() === "2") jQuery(".conditional-div").hide(); else jQuery(".conditional-div").show(); }); });
Related Posts:
- How to enable button onClick functions and java script in wordpress post
- how to add gravity forms to blog page(posts page) in WordPress
- How to put Youku video on my wordpress site?
- JS Manga Reader with WordPress NoConflict JQuery
- How to find out who is hosting my WordPress site?
- In WordPress Using Elegant Theme’s Divi Theme, Long menus don’t show
- Links not clickable on mobile devices in WordPress
- Flaticons not showing up on WordPress
- WordPress PHP proxy/helper pages for Twitter API
- Is it possible to combine a WordPress template (Semplice) and some HTML & CSS pages?
- How to add custom javascript to WordPress Admin?
- “The Events Calendar” plugin by Modern Tribe in WordPress not working
- How can I access http://localhost/wordpress/wp-admin/install.php?
- How can I access http://localhost/wordpress/wp-admin/install.php?
- Changing code font size on wordpress
- WordPress Password Protected Page is not protected
- How to fix facebook sharer button that appears cutted on wordpress
- Internet Explorer 8 issues with WordPress 3.8
- Internet Explorer 8 issues with WordPress 3.8
- Set size of WordPress thumbnail post
- How to set on load marathi language using google translator in wordpress?
- Divi Child Theme Breaks WordPress Customizer
- Cuelinks widget’s half part is getting hidden on WordPress website
- WordPress how to use jquery and $ sign
- WordPress how to use jquery and $ sign
- Muffin Builder has a limit? (WordPress – Be Theme)
- WordPress: LinkedIn Posting Link doesn’t show meta og description or titleοΏΌ
- How can I embed a YouTube video in a WordPress template page?
- Custom CSS in WordPress messing up
- How to properly use jsPDF library
- How do I link a JavaScript file to a HTML file?
- How do I check whether a checkbox is checked in jQuery?
- ReferenceError: $ is not defined
- How do I check whether a checkbox is checked in jQuery?
- jQuery document.createElement equivalent?
- Pure JavaScript equivalent of jQuery’s $.ready() – how to call a function when the page/DOM is ready for it [duplicate]
- Automatically pausing html5 video as the ‘next’ button is pressed (javascript/ jquery)
- How can I scroll to an element using jQuery?
- jQuery.click() vs onClick
- jQuery Get Selected Option From Dropdown
- Check if checkbox is checked with jQuery
- How to add jQuery code into HTML Page
- How can I get the data-id attribute?
- Check if checkbox is checked with jQuery
- Adding attribute in jQuery
- Bootstrap Dropdown menu is not working
- jquery SlideToggle effect in upward direction?
- Change Background color (css property) using Jquery
- Failed to load resource: net::ERR_FILE_NOT_FOUND loading json.js
- Get class name using jQuery
- JavaScript runtime error: ‘$’ is undefined
- Export html table data to Excel using JavaScript / JQuery is not working properly in chrome browser
- Set timeout for ajax (jQuery)
- How to hidden field in contact form 7
- Use images like checkboxes
- How to read xml file contents in jQuery and display in html elements?
- JavaScript Loading Screen while page loads
- Force a default browser on my android phone using a simple html shortcut page
- Not Authorized to View This Page
- Get the value in an input text box
- Jquery swipe left or right on mobile
- Set selected option of select box
- Strange symbol shows up on website (L SEP)?
- How to move an element into another element?
- Bootstrap Dropdown menu is not working
- Bootstrap Dropdown menu is not working
- PHP fopen() Error: failed to open stream: Permission denied
- Create table with jQuery – append
- Click button copy to clipboard
- How to convert selected HTML to Json?
- How to Open New window on every Click
- How to make html table vertically scrollable
- jQuery.addClass not working
- Uncaught TypeError: Cannot read property ‘top’ of undefined
- How can I select an element by name with jQuery?
- Get checkbox value in jQuery
- jQuery disable/enable submit button
- Play an audio file using jQuery when a button is clicked
- How to move an element after another element using JS or jquery?
- What does this mean in my website console: “JQMIGRATE: Migrate is installed, version 1.4.1 jquery-migrate.min.js?ver=1.4.1:2 “
- Why is the jquery script not working?
- document.getElementsByClassName().innerHTML always returns “undefined”
- Jquery button click() function is not working
- How to make a simple image upload using Javascript/HTML
- How to make a simple modal pop up form using jquery and html?
- How to make Bootstrap carousel slider use mobile left/right swipe
- How to Show External website inside another page without iFrame? [closed]
- bootstrap 3 navbar collapse button not working
- Display XML content in HTML page
- HTML text input allow only numeric input
- Bootstrap throws Uncaught Error: Bootstrap’s JavaScript requires jQuery
- How to decode encrypted wordpress admin password?
- Bootstrap carousel not sliding
- The requested URL /about was not found on this server
- Play/pause HTML 5 video using JQuery
- jQuery .load() not working
- wordpress contactform7 textarea cols and rows change in smaller screens
- Refresh/reload the content in Div using jquery/ajax
- Woocommerce variable products: Sorry, this product is unavailable. Please choose a different combination