How can i use custom ajax command using #ajax api , i have the following code working well
$ajax_response = new AjaxResponse();
$ajax_response->addCommand(new InvokeCommand('#edit-event-trigger', 'attr', array('disabled',true)));
$ajax_response->addCommand(new InvokeCommand('#edit-event-trigger', 'removeAttr', array('placeholder')));
$ajax_response->addCommand(new InvokeCommand('#edit-event-trigger', 'css',array("background-color", "")));
//Return the AjaxResponse Object.
return $ajax_response;
But suppose if i want to focus()
or hide()
the edit-event-trigger
element , how could i do that ?
'focus'
and'hide'
?