How to disable sorting on column in jQuery.tablesorter?

I try to find a way how to disable sorting on column. I use jQuery plugin tablesorter. And by default if you click on header cell it sort column data, but what I need to do if I don’t need to use sorting on one or two column in four columns table. Thanks in advance.

Skip and return objects from list of object using Lodash/Underscore

I need to perform an operation similar to the following written in C#: int[] items = { 1, 2, 3, 4, 5, 6, 7 }; var a = items.Skip(2).Take(3); Which return 3, 4 and 5 Similarly I need to skip records from a list of object $scope.myObject = [ { Editable: true, Name: “Daniel Test”, […]

React' findNodeHandle method stopped working

After upgrade to 0.26.0-rc version, this line: React.findNodeHandle(this.refs.myRef) Throws this error message: Unhandled JS Exception: _react2.default.findNodeHandle is not a function. I’m importing React with this: import React from ‘react’; Docs still say: “As always, to obtain a native node handle for a component, you can use React.findNodeHandle(component).”

canvas getContext(“2d”) returns null

I’ve tried this a few different ways, but I keep getting stuck with the same error. I’ve loaded an image to canvas before, but since I updated Safari a few days ago, I’m getting errors. I’ll post what I have at the moment, but I’ve tried doing it with jQuery, html’s onLoad property, etc. var […]

How can one add drop shadows to Raphael.js objects?

I would like to find out how to add blurry edged drop shadows to Raphael.js objects/paths. As far as I know it is not possible with the library as is but is there a work around?

How can I make this call to request in nodejs synchronous?

I have a function in my nodejs application called get_source_at. It takes a uri as an argument and its purpose is to return the source code from that uri. My problem is that I don’t know how to make the function synchronously call request, rather than giving it that callback function. I want control flow […]

protractor – how to get the result of an array of promises into another array

I got an array of promises from this code: element.all(by.repeater(‘unit in units’)), and I am finding it really difficult to get the data into another array: element.all(by.repeater(‘unit in units’)).then(function (arr) { var items = []; for (var i = 0; i < arr.length; i++) { arr[i].getText().then(function(text) { items.push(text); }); } //PROBLEM ITEMS is Empty console.log(items); […]

jQuery: wait for function to complete to continue processing?

Hey all. I have, what appears to be, a trivial problem. I have the following JavaScript: $(function() { var r = GetResults(); for(var i = 0; i < r.length; i++) { // Do stuff with r } }); function GetResults() { $.getJSON(“/controller/method/”, null, function(data) { return data; }); } Due to the fact that I’m […]

Ajax, prevent multiple request on click

I’m trying to prevent multiple requests when user click on login or register button. This is my code, but it doesn’t work. Just the first time works fine, then return false.. $(‘#do-login’).click(function(e) { e.preventDefault(); if ( $(this).data(‘requestRunning’) ) { return; } $(this).data(‘requestRunning’, true); $.ajax({ type: “POST”, url: “/php/auth/login.php”, data: $(“#login-form”).serialize(), success: function(msg) { //stuffs }, […]

How do I skip items when tabbing without using tabindex?

Is there a good way, in a javascript onfocus() handler, to trampoline the focus to the next item in the tab order, without having to manually enter the ID of the item that should be next? I built an HTML date picker in Django/jQuery. It’s a line edit followed by a calendar icon that pops […]