sonnb
Well-known member
Currently XenForo use this to pass extra params from data attribute to POST data.
But since this example
would be automatically parsed as Object when calling: $input.data('acOptions'). It would not able to pass any params as parseJSON returns null.
It should be (without parseJSON).
Code:
if ($input.data('acOptions'))
{
options = $.extend(options, $.parseJSON($input.data('acOptions')));
}
But since this example
Code:
data-acoptions="{"extraParams":1}"
would be automatically parsed as Object when calling: $input.data('acOptions'). It would not able to pass any params as parseJSON returns null.
It should be (without parseJSON).
Code:
if ($input.data('acOptions'))
{
options = $.extend(options, $input.data('acOptions'));
}