jquery - Combine 2 functions into 1 -


How do I add this function? Basically, when the checkbox is clicked on, something happens and if the page loads and if the checkbox is already clicked, then it is the same as the other thing.

  $ (document) .on ("click", ".dimensions", function () {var size = $ ('.td-hide'); if ($ ('Input (': Check')) {size.show (); $ ('single-select-sm'). CSS ('width', '148 pixels')} and {size (hide) ; $ ('Single selection-sm'). Css ('width', '230px')}}); $ (Function () {var size = $ ('. Td-hide'); if ($ ('input # dimension') is (': check')) {size.show (); $ (' Single CSS ('width', '148px')} and {size: hide (); $ ('single selection -sm'). CSS ('width', '230px')}};   

  var myFunc = function () {var size = $ ('.td- hide) '); If ($ (' 'input # dimension' ') is (': check ')) {size.show (); $ (' single select-sm '). CSS (' width ',' 148 px ''} {{Single.http; sm;}; css ('width', '230px')}} $ (document) .on ("click", ".dimensions ", Funk Not () {myFunc ();} $ (function () {myFunc ();}    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -