With Granite UI, when I handle a client-side js event of type 'foundation-field-change', what should the code look like to adapt the data to the underlying object?
For example, my callback function signature is,
$(document).on('foundation-field-change', function(event) {...}
I want to do some work involving the changed field - how do i get to it/adapt to it? Docs are here foundation-field — Granite UI 1.0 documentation but I need a little more help.
thanks Joe
Solved! Go to Solution.
Views
Replies
Total Likes
Dear Dorian,
As per javasccript API, we have adaptTo method registered to jQuery provided by Adobe.
Therefore you call:
$(window).adaptTo("foundation-registry") in this example we adapt window to foundation-registry.
Regards,
Peter
Views
Replies
Total Likes
Dear Dorian,
As per javasccript API, we have adaptTo method registered to jQuery provided by Adobe.
Therefore you call:
$(window).adaptTo("foundation-registry") in this example we adapt window to foundation-registry.
Regards,
Peter
Views
Replies
Total Likes
Thanks PuzanovsP,
Does the following sound correct? For an event, if the docs describe its adaptTo type as 'foundation-field' I should be able to write,
$(document).on('foundation-field-change', function(event) {
var f = $(event).adaptTo('foundation-field');
...
}
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies