I need to call the function as follows:
var f = 'fadeOut'; $(v).f(s, function(){ $(v).css('visibility', 'hidden').css('position', 'absolute'); });
Can this be done simply?
Yes
var f = 'fadeOut'; $(v)[f](s, function(){ $(v).css('visibility', 'hidden').css('position', 'absolute'); });
Source: https://habr.com/ru/post/912562/More articles:javascript focus () does not focus - javascriptIs this the DCPU-16 assembler 'dat' with a string that should generate a byte or word per character? - dcpu-16Synchronize time / events between a player (MMORPG) client and server? - javacannot route packets from one interface to another - linuxUnit test: claim it doesn't work? - javaRefer to the class variable in another class variable definition - pythonASP.Net MVC 3: Baby for Children and Redirection - asp.net-mvcHow to get navController from AppDelegate. - iosWhy does the "I" outside the function parameters give an "undefined" error? - pythonhas_many through association-dependent destruction, provided that someone called destroy - ruby-on-railsAll Articles