0

Trying to use a tag plugin https://timseverien.com/projects/taggd/, got the basic part ok. When I try to call a function, it says function not defined.

taggd.show()

http://jsfiddle.net/aW8ZY/40/

3
  • what are you trying to do? Commented Nov 19, 2014 at 17:17
  • taggd is a function and has no property "show" - what are you triying to do with taggd.show() - @RoryMcCrossan jsfiddle works for me Commented Nov 19, 2014 at 17:18
  • @RoryMcCrossan if you look in the author page, it says tagged.show() can be used. fiddle works, but the .show() ( and there are update functions I wish to use) are not working Commented Nov 19, 2014 at 17:20

2 Answers 2

1

taggd var is undefined... either chain the .show() or assign a var.

Chain:

$('.item').taggd( options, data ).hide().show(1);

http://jsfiddle.net/6pensfqw/

Assign a var: (as your original code, just assigned a var taggd)

var taggd = $('.item').taggd( options, data );
taggd.hide();
taggd.show(1);
Sign up to request clarification or add additional context in comments.

Comments

0

taggd is a jQuery plugin, so it needs to be used with a jQuery selector, like this:

$('.taggd').taggd( options, data );

The examples given by the plugin website require that the variable taggd has already been assigned and can therefore be used like this:

var taggd = $('.taggd').taggd( options, data );
taggd.hide();
taggd.show();

(Admittedly, this is not particularly clear in their examples.)

Alternatively, you can simple chain commands like this:

$('.taggd').taggd( options, data ).hide().show();

http://jsfiddle.net/aW8ZY/44/

3 Comments

@CaseyRule OMG, did you write all that choral music on your page? I am a big fan!
Haha yes I did! I never imagined anyone would actually find my music from StackOverflow
@CaseyRule I was thinking the same thing. I was like, what a place to find some awesome music. :) I hope you keep writing. I am a big fan of choral music. Thomas tallis being a name I remember to follow :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.