-12

One of my previously posted question is put on hold, being tagged as off-topic.

I have some confusions regarding this.

Here's the link: https://stackoverflow.com/questions/31654709/hide-an-option-form-the-list-when-its-selected-and-vice-cersa-using-chosen-plugi

Why is the question being stated off-topic?

I have provided a fiddle link, and explained it clearly.

Is there something I am missing out?

Is it because I have not provided any sample code? But as you can see, I have provided the fiddle link.

Is fiddle link not considered as a code explanation?

22
  • But there are many questions on SO, which don't have code samples. Is it mandatory to put code sample? Or I do need to provide code sample, every time I will be providing a fiddle? @FrédéricHamidi. And lastly, why is put as off-topic then? Its surely a jquery related question
    – Saswat
    Commented Aug 12, 2015 at 8:15
  • 7
    @Saswat And what if that fiddle link dies? The question becomes useless to future readers with the same problem.
    – Daedalus
    Commented Aug 12, 2015 at 8:16
  • 6
    @Saswat, it is mandatory to provide a code sample when you provide a jsFiddle link (for the reasons explained by Daedalus). As for the close reason, the explanation is readily available in the close banner: Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Commented Aug 12, 2015 at 8:17
  • @Daedalus, ah yes. I didn't think like that. Actually, previously when I used to provide some code sample(for complex codes) people used to ask me for fiddle. So I thought that providing only fiddle will do, because lot of people ask for fiddle. Thanks for explaining.
    – Saswat
    Commented Aug 12, 2015 at 8:18
  • 4
    Instead of a fiddle, did you consider using a Stack Snippet instead?
    – rene
    Commented Aug 12, 2015 at 8:19
  • 1
    @Saswat the requests for fiddles generally predated the introduction of native "Stack Snippets", and never replaced the need for code in the posts themselves.
    – jonrsharpe
    Commented Aug 12, 2015 at 8:21
  • @FrédéricHamidi, but sir, the desired behaviour is explained as requirement. And the fiddle itself is the shortest code and the error happening. Is it tagged offtopic for not providing the code sample directly into the question?
    – Saswat
    Commented Aug 12, 2015 at 8:21
  • 5
    @Saswat yes, exactly; if you edit it to remove the noise and move the fiddle into a stack snippet, it will get reopened. You can then add an answer to show what actually worked for you (again, with a snippet). In the future, please don't just cheat your way into posting by applying random code formatting.
    – jonrsharpe
    Commented Aug 12, 2015 at 8:22
  • @Saswat It also quite clearly says 'in the question itself'; don't discount one line because another exists.
    – Daedalus
    Commented Aug 12, 2015 at 8:22
  • @rene, Actually I tried once. But couldn't understand how to add codes, or external links. :(
    – Saswat
    Commented Aug 12, 2015 at 8:26
  • Hmmm, not sure why that shouldn;t work, did you go over the examples here? Might be worth another meta post ;)
    – rene
    Commented Aug 12, 2015 at 8:31
  • @rene, No I have decided not to post anything on meta from now onwards. It displeases some people and I just invite a series of downvotes. I tried to get some example of how to write in snippets, but due to some reasons, wasn't successful. Anyways, thanks for your help.
    – Saswat
    Commented Aug 12, 2015 at 8:33
  • 1
    well, on meta voting is different so I wouldn't be to concerned about that. The votes mainly convey that they disagree with you that a jsfiddle is enough. No reputation is hurt in the process...
    – rene
    Commented Aug 12, 2015 at 8:45
  • 4
    @Saswat alternatively, you could search before posting questions on meta -- as has been suggested to you previously. Or just scroll down. There were two other questions about this topic on the first page of meta.
    – TZHX
    Commented Aug 12, 2015 at 8:49
  • 2
    @Saswat And you did it again. Man you've got a pretty flat learning curve :-P ... Meta effect again, whining about (righteously) downvoted questions again. I was one of those serial downvoters you suspect to spoil your rep. I was targeting you by inspection of the quality of your questions. Though I'm not an expert regarding Java-script or PHP, I can well see many of your questions are low researched, and qualify you for help-vampireing as mentioned earlier. Same applies for your Meta SO questions IMHO, and also mentioned that on another closed Meta question you've asked recently. Commented Aug 12, 2015 at 19:54

2 Answers 2

11

Everything you need should be in the question. If you can use Stack Snippets to demonstrate the problem then do so.

If you want to provide additional links that you think might make it easier for someone to help you such as a jsfiddle then feel free to add them too, but they are just that additional information.

One of the off-topic reasons is:

Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself...

So if you don't do that you run the risk of the question being closed on precisely those grounds. If you're lucky someone might add the code in the question itself instead but why run the risk?

Your aim is to get an answer to your question isn't it? If so bend over backwards to make it easy for someone to answer it. The harder your question is to answer the more likely potential answerers will just give up and move on to another better written question instead.

5
  • I am highly reluctant to edit code into a question from a jsfiddle or other site, simply out of respect for others' creative rights. If they wanted it in, they would put it in or ask politely for help putting it in. Putting code on SO grants a license and that is not a step a 3rd party is authorized to take without permission.
    – Paul
    Commented Aug 12, 2015 at 8:43
  • 2
    If it's a fiddle created by the asker of the question and it only contains a minimal demonstration of the issue I don't see that there's much of a problem. Most people don't bother though. Commented Aug 12, 2015 at 8:46
  • @Paul if you leave the link to the jsfiddle I see no issue with the creative rights / license issue...from the legal part on jsfiddle.net All code belongs to the poster and no license is enforced.
    – rene
    Commented Aug 12, 2015 at 8:49
  • 1
    @rene The issue is moving code from jsfddle to SO. All user-contributed text and code on SO is CC-BY-SA licensed. I suspect the legal note on jsfiddle simply means that (i) code still belongs to whoever posted it, not jsfiddle; and (ii) jsfiddle will do nothing about anyone who copies content. Which is good to know, if you were to post something there. The copyright owner who posts a jsfiddle with a copyright notice / license can still pursue others who infringe... but this becomes a tiresome legal discussion best left to law.stackexchange.com
    – Paul
    Commented Aug 12, 2015 at 8:54
  • 1
    I'm 100% with you on the last sentence (and I'm Ok with the rest). ;)
    – rene
    Commented Aug 12, 2015 at 8:59
0

OP, After looking at your link, I find that the code presented doesn't help with regards to the question. What you should do is provide ALL code that is relevant to the question which in your case would be the HTML code that produces the options. The less relevant code you provide, the lower chance you have of getting a great answer.

You must log in to answer this question.

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