I am trying to animate the width of an element using the speed and calc () function.
$("#menuContainer").velocity({width: "calc(100% + -260px)"}, 500);
this animates the width of the element to 0.
. speed doesn't support css calc () function? or I do not see the main syntax error?
Why don't you use
$("#menuContainer").velocity({width: '-=260px'}, 500);
For a width of 50% you can use:
var menu=$("#menuContainer"); menu.velocity({width:menu.width()/2}, 500);
Source: https://habr.com/ru/post/1244693/More articles:Force TLS> 1.0 on the local AppEngine development server in Java - java@Async does not work after upgrading to Spring Download 1.3.3 - java_pickle.UnpicklingError: could not find MARK - pythonLaravel user command not working - phpAngular for Aurelia Transition - some basic questions - javascriptSuperscan in ggplot2 using plotmath - rDoes conversion from byte to byte convert copy? - pythonBootstrap-Sprockets error: import file not found or unreadable: bootstrap-sprockets - ruby-on-railsJavascript injected in browser - javascriptto take a snapshot of the video frame in every second - javascriptAll Articles