Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is it possible to add and remove class names in ANCC canvas

LEGEND ,
Jul 27, 2018 Jul 27, 2018

Is it possible to add and remove class names to symbols' instances since we are using JavaScript and Jquery?

I am thinking of senari where I need tracking questions done or not done, etc... Sometimes I accomplish that with variables but sometimes I prefer a class.

528
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 27, 2018 Jul 27, 2018

you should be able to add a className:

this.mc.className='correct_class';

because of timing issues (you'll need to add jquery before using addClass() ) i'm not sure addClass() will work that way you want.

Translate
Community Expert ,
Jul 27, 2018 Jul 27, 2018

you should be able to add a className:

this.mc.className='correct_class';

because of timing issues (you'll need to add jquery before using addClass() ) i'm not sure addClass() will work that way you want.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2018 Jul 27, 2018

Thank you for your answer.   I guess I will have to experiment.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2018 Jul 27, 2018

If you're talking about the HTML DOM attribute class (intended for CSS formatting and element selection), that only exists on HTML DOM objects. It does not exist on canvas stage objects. The only DOM objects Animate creates automatically are the jQuery UI widgets.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2018 Jul 27, 2018
LATEST

Interesting. Thanks for your input.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines