Questions for javascript


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...

Search and Replace with Numbers

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

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.

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

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.

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.

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.

Update <div> with JSONP value jQuery

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

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...

Comparing numbers wrong

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

Jquery toggle .. fixing alighnment

Hello people i have this script

Javascript slider jquery

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

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.

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...

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...

how to append table to DIV

I am trying to append a table to div:

JavaScript: Bitwise shift of long long number

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

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...

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?

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:...

Modular javascript event library

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

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?

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

Javascript / JSON alert returning Undefined

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

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...

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.

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...

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.

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

I have a simple html page and a js script:

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.

“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?

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...

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

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...

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.

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?

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...

Backbone.View.extend - events hash

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

Javascript syntax issue

Here is my jsFiddle

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...

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

Can someone explain what this Email regex means


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:

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:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.