I don’t use Javascript a lot and this has me stumped on where to start. Goal is to create JS that sets the Sales Channel Hidden field value based on other field values per the order of operations as follows: Order of operations If Industry = Cleanroom, Sales Channel = ABC If Industry = Healthcare, Sales Channel = DEF If
Tag: jquery
Hide elements that don’t match value from input field and keep only ones that have it
I’m doing a small project where I’m searching for words in collapsed elements. If found, some collapsed elements are opening to display the word. The next thing I would like to achieve is to keep only the li that contain it and hide the others. I’m not sure how to proceed further to achieve this. What I’ve tried, hides exactly
How to use Fetch API and append correctly
This is my html This is example html i want to fetch This is code i know how to fetch and append whole html to my id=’data’ but i don’t want to append whole html but i only want to get class=”m-card single-page” of example.com and append to my id=’data’. I don’t know how to, please advice me, thanks you
Proper way of writing $(this).text().match(r) into vanilla JS?
I have the following function written in jQuery which I would like to convert to javascript but I couldn’t find a proper way so far. I rewrote it this way: Answer
radio and select option with alert
how do i show alert if no radio button selected form two radio button and after that show alert on select option if not selected. but I am getting alert on both radio button how do I fix it Answer The problem is that in your case, the 2 if statements regarding your radio buttons will always be false for
Redirect website between two specific dates using JavaScript
I’m in need of some help regarding redirecting my website during certain days each year. I want to be able to redirect my website from the current one (A) to the other one (B) between 1st of March to 15th of April. I can’t find any way to do this without making a weird cluster of websites that loads and
owl Carousel is not working after ajax success in python Django
I want to get the parent category list on the slider by clicking the main category’s slider list. the second category’s sider is not working when I click the main category. $(‘.maincategory’).owlCarousel({ }); Answer The .empty() method clears element content but doesn’t destroy the existing Owl carousel instance on that element, you need to this with $(“.secondCategory”).trigger(“destroy.owl.carousel”) before setting the
Changed data attribute not recognized in jquery selector
I’ve the following html structure and the following js I would expect, that after the second click on .start, the console would show “Test”, but it doesn’t… Can you tell me what I’m doing wrong? Thanks in advance! Answer While you have your answer, I don’t think the essential point has been made in any of the answers so far,
Hide two blocks at the same time
I have a method on a page that opens and hides a scrolling block in certain places Now it turns out that in my sideMenu there is only one block, but I want to add another one and so that they hide and open together This is how the code should look like after adding the block But now I
jQuery Date Picker- Block a future date range
I have jQuery Date Picker on a Shopify store and have been having some issues trying to block out the upcoming range of dates from 24/12/2021 – 04/01/202 DD MM YY, we will not be operating on these days. Any advice would be very much appreciated, this is the script we are currently using. Answer You need to use beforeShowDay