Skip to main content
Nintex Community Menu Bar
Question

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

  • Jul 9, 2024 9:48 PM UTC
  • 4 replies
  • 42 views
  • Translate All

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.

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 10:57 PM UTC

Zach,

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

Translate

Forum|alt.badge.img+13

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

Translate

Forum|alt.badge.img+18
  • Author
  • Jul 9, 2024 10:57 PM UTC

Hmm, unfortunate. Ok.

Translate