Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • seanrock 262 posts 483 karma points
    Apr 04, 2022 @ 17:08
    seanrock
    0

    Calling a jquery method on an element of a property editor from an angular controller

    Hi

    using V9

    As cannot find a suitable colour picker I'm trying to replicate the colour picker umbraco uses. It uses the spectrum library and its actually the colour picker the approved colour picker uses when defining the colours.

    If there is an easier way please tell me. However i need to call the $().spectrum() method to initalise the input element however, when I call that from within the controller the element is not setup properly. If i call $().spectrum() in a script tag in the property editor html for example, it is initialised but the 'color' property which is equal to model.value, is not correctly set. If I output model.value I can see it has the correct value but it needs to be set within the js config element $().spectrum({'color':model.value}).

    Any advice is appreciated.

Please Sign in or register to post replies

Write your reply to:

Draft