Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery do something if toggle open and close

$('.advance-view').click(function() {
    $('#advance-control').slideToggle('slow', function() {
        if ($('#advance-control').is(':hidden'))
        {
            $('.advance-view').css("background-color", "#2B509A");
        }
        else
        {
            $('.advance-view').css("background-color", "#4D6837");
        }
    });             
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: js var vs const 
Javascript :: how to use useeffect 
Javascript :: c# razor for loop javascript 
Javascript :: delete last character from string js 
Javascript :: event.currenttarget 
Javascript :: multer express file upload 
Javascript :: scroll value bottom js 
Javascript :: array includes 
Javascript :: jquery get all classes of a div 
Javascript :: get current date javascript yyyy-mm-dd 
Javascript :: toggle boolean state react 
Javascript :: JavaScript Finding HTML Element by Id 
Javascript :: slice string js 
Javascript :: javascript includes check object 
Javascript :: javascript equivalent of CTRL+F5 
Javascript :: ordenar un array de menor a mayor 
Javascript :: JS stack array backwards 
Javascript :: google script check if cell is empty 
Javascript :: react router lazy load 
Javascript :: element remove class 
Javascript :: javascript ES6 Default Parameter Values 
Javascript :: javascript discord bot 
Javascript :: what is xhr 
Javascript :: jquery global variable 
Javascript :: react eslint prettier 
Javascript :: learn nestjs 
Javascript :: try catch async await 
Javascript :: react check internet connection 
Javascript :: how to change icon from play to pause in javascript 
Javascript :: handle onchange react 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =