ECMAScript (commonly referred to as JavaScript) is primarily used for scripting web-pages but also has several embedded forms and stand-alone interpreters / JIT engines. Use this tag for questions regarding ECMAScript 5 and its dialects / implementations: JavaScript, JScript, etc., excluding ...

learn more… | top users | synonyms

1
vote
1answer
31 views

JQuery is working but clunky/slow

I'm coming close to finishing a site where there are a number of jQuery functions going on. They all work, but the page is just running a bit too clunky. The fading in and out is just not as smooth as ...
2
votes
1answer
39 views

JavaScript object to JSON

Since I didn't find a way to properly transform JavaScript object to JSON with PHP, I wrote a snippet. Lets assume the following excerpt from Google Fonts JavaScript API: WebFontConfig = { ...
0
votes
1answer
29 views

Roll your own widget factory

So for practice with Javascript, I wrote this lightweight widget factory which is similar in functionality (okay, that's a bit of a stretch) to jQuery's UI Widget factory. I was hoping I could get ...
-2
votes
0answers
11 views

Is it a good Idea to upload Image after encoding it to base64 to enable fileUpload via Ajax? [closed]

I want to upload different files via Ajax post to my asp WebService. Is it a good idea to convert the file into base64 encoding and send it to Asp and convert it back again to byte array?
-1
votes
1answer
36 views

Improve this jquery code

Such as the title, how to make it more clean and improve it. (from a jquery novice) $.extend({ misTip : function($tipSettings) { $tip = $tipSettings.tip ? $tipSettings.tip : ''; $closeTime = ...
-2
votes
0answers
15 views

I need help getting my footer to not cover my content when I resize the browser [closed]

I've used this Sticky Footer solution to get my footer to stick to the bottom of my page even when the browser is resized. So this is what I have now: My header, main content, and the footer. Now, as ...
0
votes
1answer
78 views
+100

Jquery sortable style function

This is a basic sorting function written in jQuery that moves items in the DOM around to create empty spaces for a droppable(). Since there is so much going on in a droppable over event, i'd love some ...
1
vote
2answers
52 views

JavaScript - Does this link need improvement?

I would like to hear your feedback on the link below that lets users add a link to a website. I read that javascript:void(0) is suggested instead of a # for the <a href="" attribute. Is this still ...
-2
votes
0answers
59 views

Browser State change code

I've written this simple snippet that will intercept clicks to links, grab the href, load it via ajax, then update the state in the browser. Also the back button works well, which is a must. The links ...
0
votes
1answer
67 views

Tidying js files

I usually find the .js files to be quite messy and the truth is that mines are even worse than the average as, being soft, I'm not the sharpest tool neither at Jquery nor Javascript. So I would ...
0
votes
0answers
83 views

What's wrong with this javascript programming approach?

Helllo people I'm now developing an instant messaging system but I'm a little confused : I can't decide which approach do I have to choose! Here is a code and I want you to tell me what is good/bad ...
1
vote
0answers
18 views

Jvector Map add/remove function shorten code

I am achieving a hover state per continent through: var continentId ="" function getID(continentId){ jQuery.each(mapObject.mapData.paths, function(i, val) { if (val.continent == ...
0
votes
2answers
49 views

help me optimize/simplify this jQuery function

This works as intended, but was wondering if there is a more efficient way of coding this. if (window.location.href.indexOf('/search/') >= 0) { switch ($.cookie("Layout")) { case ...
0
votes
0answers
33 views

Mixing prototype and module pattern… I think

I have either created something beautiful or something monstrous, and I'm not really sure which, and I don't know where else to turn but here. What I've done: var MyObject = function(opts) { ...
2
votes
0answers
53 views

Very fast query selector — did I miss something?

A few months ago, I wrote a query selector that seems to outperform the query selectors in the popular GP libraries by a pretty hefty margin. I'm wondering if I overlooked something; it seems odd that ...

1 2 3 4 5 67
15 30 50 per page