Skip to main content
Nintex Community Menu Bar
Question

$(ID).data('object') doesn't seem to work in mobile

  • July 9, 2024
  • 4 replies
  • 8 views

Forum|alt.badge.img+18

I built a custom signature component using jSignature and would like to use it on mobile, but mobile doesn’t seem to like the $(‘MyComponentId’).data(‘object’) syntax. Help?

This topic has been closed for replies.

4 replies

Forum|alt.badge.img+13

$(‘#MyComponentId’).data(‘object’) only works for several desktop components, and it returns something slightly different than what .data(‘component’) returns for these components — for most components, including all mobile components, what you want to get access to is the Component object, and this is returned through either skuid.$C(‘MyComponentId’) if your component has a Unique Id, or element.data(‘component’) if you have a jQuery-wrapped element reference in context.


Forum|alt.badge.img+18
  • Author
  • July 9, 2024

Zach,

Does this mean that I can replace element.data(‘object’) with element.data(‘component’) and get the same results?


Forum|alt.badge.img+13

No, it does not. Where .data(‘object’) is available, it usually returns something different than .data(‘component’)


Forum|alt.badge.img+18
  • Author
  • July 9, 2024

Hmm, unfortunate. Ok.