3

This question's code initially didn't use the jQuery script tag. I proved the code was working correctly in jsfiddle, except that it lacked jQuery.

Trigger CSS transition with JavaScript

Then the user included the jQuery script tag in the code snippet, but it still wouldn't work.

Anyone knows why? Is this a code snippet bug?

5
  • The only thing tags do is syntax highlighting...
    – Laurel
    May 4, 2016 at 3:06
  • but then how can the code be run ? May 4, 2016 at 3:06
  • You can use Stack Snippets on Meta, for example. It's not magic... What exactly don't you understand?
    – Laurel
    May 4, 2016 at 3:10
  • Well basically 3 things: 1 - if it just highlight things how come there is a working "run code snippet" button ? 2 - if it runs how it didn't recognize script tag with jquery link so that I can run jquery code in it ? 3 - if it recognizes jquery, and I think it recognizes cause I have seen examples of this, why the question code won't recognize jquery ? May 4, 2016 at 3:12
  • The "Run Code Snippet" thing is completely different feature than the syntax highlighter and tag system. (Plenty of users are stupid and put Android code in there anyway.) I'm not a jQuery expert so I can't really tell you why the code wasn't working.
    – Laurel
    May 4, 2016 at 3:15

1 Answer 1

3

This has nothing to do with Stack Overflow or code snippets. You fixed the problem by adding a newer version of jQuery.

jQuery SVG, why can't I addClass?

Regarding your suggested edit, please don't edit questions to fix them. That completely defeats the purpose of this site.

2
  • Welll but it's still not working to me May 4, 2016 at 3:21
  • Put a newer version and it worked. Thanks May 4, 2016 at 3:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .