To keep the jQuery Forum in "proper shape", thus keeping it effective as possible for all visitors, I would like to propose some guidelines. Ofcourse feedback is welcome if you feel something is missing or incorrect.
Yomodo
GENERAL
Validate your HTML and CSS markup; If, for example, a HTML element doesn't appear where you expect it to be, this doesn't mean the jQuery .position(), .offset() or .css() methods contain a bug.
Validate your JavaScript; Even the most skilled programmers make typo's or don't declare a variable which eventually can result in hard-to-track-down bugs. By linting your code, you can eliminate these tricky situations as much as possible.
Specify the version of jQuery / jQuery-UI / jQuery-Mobile being used; Since jQuery is undergoing constant development, it might be possible that a certain method requires a different way of invoking then you're used to.
Also, if jQuery is not being used in a mission-critical production environment, or you are starting a fresh project, always use the latest version of jQuery,
Specify the browser version; "It does work on Opera and Firefox but not in IE and Chrome." Just like jQuery, browsers are also undergoing constant development.
"It does work on Opera 11.01 and Firefox 3.6.15 but not in IE 9.0 and Chrome 10.0" This would be more detailed description and can prevent unnecessary questions regarding your post.
This also applies to the Operating System used: Windows XP SP3, Windows 7 SP1, Linux, Android...
Specify the jQuery technology used, use the correct forum; Currently jQuery consists of jQuery, jQuery-UI and jQuery Mobile. Make sure you specify the appropriate jQuery technology.
In general post either in Using jQuery or Getting started unless, of course, you're sure it's a jQuery-UI or jQuery Plugin issue.
Use a clear, compact, Subject for your post which is related to your issue; A subject like: "jQuery bug!" does not reflect anything about the real issue you may have. Since all posts are listed by subject, potential-helpers will probably be more willingly to read your post when properly described; they might have the same issue as you do or already have a fix in mind.
Describe your issue clearly; At the moment of reporting an issue, you are the only one who is struggling with it. Other readers have no idea what your issue is, so always clearly explain what the issue is,
and/or what triggers it. What are your expectations of a certain function call / action you perform, even specifically
name that pesky HTML element that's bugging you.
Pasting code;
Please differentiate your pasted text by marking it as code, you can use the "Insert Code" icon for this.
Please try to avoid pasting your complete script, try to stick with the relevant parts. Also, be kind to your readers by using proper indentation in your code.
jQuery Plug-ins; When you post an issue about a certain jQuery plug-in, at least paste the URL of the plug-in or some other reference. Those, who are willing, can then easily look it up. Remember you are asking others for help, so at least supply some easy reference.
Tag your post;
Make sure you supply relevant tags to your post. This can improve the search results of the Forum for other users.
Mark your post;
If someone has been able to answer your issue, or you're satisfied with the answer then please
mark your question as answered by using the "This answers the question" link. This can also help other users searching for answers. Oh, and don't forget, a simple Thank you! can do miracles, wouldn't you agree?
Also, when you issues is fixed, it's bound to happen you'll run into another issue. Chances are that it'll be a whole different issue so it would not fit the original post-subject any longer. Better start a new post then.
DO NOT double-post; Please do not double-post. If no one has replied on your post, it's probably because (a) nobody knows or (b) you didn't pay attention to any of the above guidelines. Double-posting your issue, to attract peoples attention, will only clutter the Forum. Better yet, modify your original post according to the above guidelines.
And last, but not least: "What have you already tried yourself?"; Did you at least search the net?
If so then post any relevant URL's to prevent others from posting these as a possible solution. Remember, not all issues you encounter are jQuery related, sometimes it might be a JavaScript
"thingy".
EXPECTATIONS
Don't expect others to write your (complete) code for you, sure, those who are willing to help you will do so.
Even mentioning you're a newbie doesn't justify it, better yet: dive into the jQuery API's or the documentation of a specific plug-in. Want to know how the $.ajax() method works? Just look up the jQuery API documentation. You will only master something if you really put some effort into it.
Make sure you at least have some basic skills and/or understanding of the commonly used web technologies: HTML, CSS and JavaScript.
Yes, jQuery is the "Write Less Do More JavaScript Library", but the "Write Less" part is your share.
Given the following standard jQuery code to .get() a (valid) .xml file:
$.get(file)
.success(function(data, textStatus, jqXHR) {
oUIxml = $(data);
});
Later on, I need the XML document part from the oUIxml jQuery object. Is there any way to achieve this without using something like .each() ?
If I do:
alert( oUIxml.text() );
It'll get me all the text values from all nodes as one big chunk of text. But what I need is only the XML document, in fact just like:
alert( jqXHR.responseText() );
This is exactly what I need, it'll get me the complete XML document structure, including all nodes and texts. If I have this as a string I can then use $.parseXML() to convert this (back) into a XML document.
Unfortunately the ticket has been closed with an unsatisfying respose, in my opinion. Perhaps I'm overlooking something, that's why I need you guys (and girls) for a second, third... opinion.
My objective: Locally, from within a .HTA, load a valid .xml file and retrieve the returned XML object through the responseXML method. I use the jQuery method: $.get() for loading the .xml file.
I only keep getting back "undefined" in IE9 whereas Firefox 3.6 clearly returns an XML Object, as it should be. My goal is to transform this XML object with an .XSL stylesheet.
I can only reach this goal by using the responseText method, which then has to be converted back to an XML object, which doesn't make any sense to me.