Tagged Questions

JavaScript is a dialect of the standardized ECMAScript programming language, primarily used for scripting web-pages. Use this tag for questions regarding ECMAScript and its dialects/ implementations: JavaScript, JScript, etc., excluding ActionScript.

learn more… | top users | synonyms

3
votes
1answer
33 views

Feedback of working javascript code

I am quite new to javascript and I wonder if you experts can see any obvious mistakes (bad javascript coding) below? Or if there are any good improvements? The code is working... Noted improvements: ...
2
votes
4answers
20 views

Improving search through XML file

I'm working on a function that extracts information from an XML document and compares to what the user has typed in. Can you suggest any ways in which I can improve it? The variables in the XML file ...
0
votes
0answers
15 views

Improving search through XML file [closed]

Possible Duplicate: Improving search through XML file I'm working on a function that extracts information from an XML document and compares to what the user has typed in. Can you suggest ...
3
votes
3answers
68 views

Functional way to write this code

I have a pan control that look like this: Pretty standard Google Mapsish controls, IMO. When the user clicks in the top 3rd of the control, it should pan up (deltaY = +1); right third means it ...
0
votes
0answers
5 views

jQuery marquee , without flickering, less memory consumption , and no plugin

I have asked a question in stackoverflow.com. But somebody replied to ask here. http://stackoverflow.com/questions/8515848/jquery-marquee-without-flickering-less-memory-consumption-and-no-plugin ...
-2
votes
0answers
19 views

Ext JS code review check list [migrated]

Can any one share a code review check list for Ext JS in common and specially for Ext JS 3.4 ?
1
vote
0answers
12 views

jQuery marquee , without flickering, less memory consumption , and no plugin

I have tried jQuery to create an alternative of marquee. And got no success; it flickers , it does not stop on hover. I edited and edited again...and finaly came out with a jQuery + javascript mess. ...
3
votes
0answers
46 views

How can this simple handler in NodeJS be improved?

I have a pretty simple script which I am running in NodeJS (v0.6.5) to handle requests for two different host names. The script sends back a different response based on the hostname of the request, ...
2
votes
1answer
48 views

Refactor this function that moves circles along a ray to eliminate location check

I have a function that moves circles out of the way of an expanding circle. It moves them along a ray from the center of the expanding circle through the center of the circle to move. This allows all ...
5
votes
2answers
87 views

String manipulations: transform “a-b-c” into “a(b(c))”

function dashesToParentheses(str) { var list = str.split('-'); return str.replace(/-/g, '(') + repeatString(')', list.length - 1); } function repeatString(str, times) { if (times == 1) ...
1
vote
5answers
89 views

Show and hide elements in JQuery

I have the following script to reveal sections on a page if certain text in an is clicked. How do I collapse all other sections if any one of them is selected and make it scalable for 20 items? The ...
1
vote
4answers
81 views

Functions in object literals

I have 2 questions about functions inside object literals. I have included the workarounds I've been using, but they seem hackish. Is there a better way to do this? ns = { a: function (x, y) { ...
5
votes
3answers
74 views

What is the best way to refactor this javascript code for repeated loops?

I have to clean up some Javascript and I am trying to figure out a more elegant way to write this code below. It's basically looping through 3 dictionaries with the same loop structure and appending ...
3
votes
3answers
74 views

hand optimising javascript selector function

I personally want a small selector function that covers the three common cases getElementById getElementsByClassName getElementsByTagName It should support contexts and should not support ...
2
votes
1answer
62 views

How can I improve this JavaScript DOM-manipulation data-structure/algorithm?

(this is a crosspost from StackOverflow, it was suggested I asked here) Goal I've got a DOM with about 70 elements on it (divs with some content) . I need to move and toggle the display of those ...

1 2 3 4 5 16
15 30 50 per page