Questions for javascript


3839

Javascript scrollbar class and mousewheel speed in different browsers

I'm getting many reports that the mousewheel behaves differently in different browsers when using this scrollbar class. In some browsers (like Firefox) it's extremely slow while in others (mostly n...
3541

Search and Replace with Numbers

Alright so I've got list in JS formatted like so:
6164

Merge loops with jQuery.extend: last value is always the same?

I have two arrays of "hashes". I need to merge them together so the end result is another array of hashes, except the number of entries is the product of the two arrays.
8540

How to insert/update an item in a specific column of a dynamic table?

I have a dynamic table as of here As you can see, I have a column for "Status" which i hope to get status reply through this done(function()). This is what i've tried
1061

Detect iOS version less than 5 with JavaScript

This is related to the "fix" for position:fixed in older versions of iOS. However, if iOS5 or greater is installed, the fix breaks the page.
5575

Javascript: Displaying images with check boxes values

I am currently working with radio buttons and check boxes to display images with the help of javascript. To be specific: I am running into an issue when working check boxes and displaying the images.
5771

CSS how to align group of elements horizontally?

I'm having trouble aligning a paragraph element with a group of button elements. I'm using jQuery and CSS to try and do this.
6478

Update <div> with JSONP value jQuery

I'm getting the temperature from a service called World Weather Online
8561

Convert standalone Javascript to widget

We have an 8,300-line Javascript application, which implements an interactive diagram for a hand of bridge. It's currently written with about 250 top-level variables, 250 functions, about 130 lines...
1648

Comparing numbers wrong

I have the following JS which compares credit card number length:
7511

Jquery toggle .. fixing alighnment

Hello people i have this script
9291

Javascript slider jquery

&lt;script type="text/javascript"&gt;
3342
2731

jquery mobile listview refresh same list lose style

I'm trying to update the content of a ul list passing from a list to another one.
4581

Spritely jQuery Plugin - Stop All Spritely Animations

I'm developing a sort of 'booklet' with a set of pages that can be viewed one at a time. On each page, there is a lot of animation going on using the jQuery Spritely plugin, both the pan() and spri...
3270

AngularJS, clicking a button within a form causes page refresh

I have a form in Angular that has two buttons tags in it. One button submits the form on ng-click. The other button is purely for navigation using ng-click. However, when this second button is c...
5162

how to append table to DIV

I am trying to append a table to div:
1175

JavaScript: Bitwise shift of long long number

I need to bitwise shift a value 64 times in JavaScript. But JavaScript starts rounding after 32.
387

Google maps watchposition { setzoom() } overrides user zooming

Hey guys I've finally got my google maps working the way I want it, but I don't want my zoom to prevent the user from zooming in themselves (this keeps resetting it), I put a conditional on my setZ...
297

Dynamically calling Canvas Functions

Is there any way to call canvas functions using apply() or a similar method, as to dynamically call canvas methods or to be able to pass an array of arguments?
6967

Context changes on the call of $.each() function

I am using Jquery $.each to get all the elements which belong to a particular class and I wanted to call a function on each of those one after another.To achieve this, I called following function:...
6907
4982

Modular javascript event library

I want a small library that does DOM4 events. Failing that a sensible subset of DOM3 events will do.
8022

Is it advisable to use arrays in Javascript using tens of thousands of indexes?

Is it advisable to use arrays in Javascript using tens of thousands of indexes?
4753

Online source code editing element

I'm wondering if there is some sort of element (preferably jQuery since this library is used) which enables online editing in a (converted) textarea. Basically what I'm looking for is a framework for
314

Javascript / JSON alert returning Undefined

I am having a problem trying to alert the json data.
8559

Elegant way to wrap multiple Backbone render methods to avoid “before” and “after” event duplication?

I've divided the render() method on my View into two separate methods, in order to allow me to render the entire View, or just a small portion of the View, which is represented by an HTML form. The...
7210

Web-based yahoo-pipes alike plugin or app or … something

I am looking for advice on how to create a drag and drop interface similar to Yahoo Pipes: dragging and dropping elements and linking them together.
2728

displaying custom tooltip when hovering over a point in flot

From the example here, I kind of know how to create a Flot graph that shows tooltips when hovering. But the examples only show to how to display tooltips containing the x value, y value, label, etc...
2159

How to use a javascript variable in url.action with ASP.NET MVC WebForms view engine

I want to redirect the user to a url in a javascript function.
1635

jQuery cookie value is %5Bobject%20Object%5D

I have a simple html page and a js script:
3870

Convert jquery selectors to array

I need to be able to store the current selectors in the current viewport and then 10 seconds check if they are still in the users current viewport.
5313

“function” is not defined error in Javascript: what is the right way to call my function?

I understand a bit because of this post: JQuery, setTimeout not working why it's not working, but keeping everything this way, what is the right way to call _finalvalidate() inside my div?
9034

Does Silverlight have a performance advantage over JavaScript?

At a recent discussion on Silverlight the advantage of speed was brought up. The argument for Silverlight was that it performed better in the browser than Javascript because it is compiled (and man...
1343

Getting Value Of Radio Button And Label Text Put Into Two TextField

I'm trying to get value form label (radio) and value of radio button. When I click label or radio button, they value input into their respective textfield
3606

HTML/JavaScript tabs graceful degrade

Trying to find a good solution for tabbed based navigation on a website that I'm building. Currently I'm using jquery ui tabs but don't like the default behavior when it degrades with JavaScript tu...
3329

Javascript Create Element in Two Divisions

I want to create an iframe using javascript and then insert it into two divisions both having id "fblike". I tried to use the following code but it did not work.
8975

Can I use jwcrypto to validate a Google generated OAuth2 id_token?

Building on the work in this question: What is the proper way to validate google granted OAuth tokens in a node.js server?
7630

Why is my JSON.parse() failing on iPhone?

I am using Titanium for a mobile application. In the application, the server returns JSON data, which is then parsed by JSON.parse(). On Android, it works fine. I also double-checked it to make sur...
3407

Backbone.View.extend - events hash

I'm going through a tutorial which advises that events can be captured via a view as follows:
9848

Javascript syntax issue

Here is my jsFiddle
2488

MongoDB arrays vs objects

Lets say I want to maintain a list of items per user (in MongoDB with Mongoose ODM in Node.js environment) and later query to see if an item is owned by a user. For example, I want to store all of...
2254

How can you change how pictures load on webpages? (e.g. lower resolution)

how can I change the way an image loads on a web page? I presume using javascript to do this. I'm looking for a way to have the picture load at a lower resolution and then get "sharper". As appose to
342

Can someone explain what this Email regex means

^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))
8501

CSS loaded dynamically via javascript but not applied

I have a javascript file that load a content via AJAX and apply the appropriate style by loading the corresponding CSS file:
5335

Different font sizes on website

My website has a menu named Font Size. Basically its an option for user to change font size of website like: