Vertical Tabs with JQuery?

I want tabs along the left side of the page instead of across the top. I’m already loading jQuery for other reasons (effects), so I prefer using jQuery to another UI framework. Searches on “vertical tabs jquery” yield links to works-in-progress. Is getting Vertical Tabs to work across browsers fraught, or is it so trivial […]

Is it possible to get the index you're sorting over in Underscore.js?

I’m using the JS library Underscore and in particular using the _.each and _.sortby library calls. I’m wondering if there’s any possible way to get the index of the value within the iterator delegate _.sortBy([1, 4, 2, 66, 444, 9], function(num){ /*It’d be great to have access to the index in here */ return Math.sin(num); […]

bootstrap popover not showing on top of all elements

I’m working on a bootstrap site and after updating to bootstrap 2.2 from 2.0 everything worked except the popover. The popovers still show up fine, but they don’t show up on top of all other elements. <div> // this sits on top of the popover. this did not happen before cleaning up scripts. <div> //popover […]

Is there any reason to use a synchronous XMLHttpRequest?

It seems most everyone does asynchronous requests with XMLHttpRequest but obviously the fact that there is the ability to do synchronous requests indicates there might be a valid reason to do so. So what might that valid reason be?

JavaScript function order: why does it matter?

Original Question: JSHint complains when my JavaScript calls a function that is defined further down the page than the call to it. However, my page is for a game, and no functions are called until the whole thing has downloaded. So why does the order functions appear in my code matter? EDIT: I think I […]

AngularJS : ng-model binding not updating when changed with jQuery

This is my HTML: <input id=”selectedDueDate” type=”text” ng-model=”selectedDate” /> When I type into the box, the model is updated via the 2-way-binding mechanism. Sweet. However when I do this via JQuery… $(‘#selectedDueDate’).val(dateText); It doesn’t update the model. Why?

Is there a JavaScript strcmp()?

Can anyone verify this for me? JavaScript does not have a version of strcmp(), so you have to write out something like: ( str1 < str2 ) ? -1 : ( str1 > str2 ? 1 : 0 );

convert date to timestamp in javascript?

I want to convert date to timestamp, my input is 26-02-2012. I used new Date(myDate).getTime(); It says NaN.. Can any one tell how to convert this?

Node.js – use of module.exports as a constructor

According to the Node.js manual: If you want the root of your module’s export to be a function (such as a constructor) or if you want to export a complete object in one assignment instead of building it one property at a time, assign it to module.exports instead of exports. The example given is: // […]

Is there a way to zoom into a D3 force layout graph?

D3 has a force directed layout here. Is there a way to add zooming to this graph? Currently, I was able to capture the mouse wheel event but am not really sure how to write the redraw function itself. Any suggestions? var vis = d3.select(“#graph”) .append(“svg:svg”) .call(d3.behavior.zoom().on(“zoom”, redraw)) // <– redraw function .attr(“width”, w) .attr(“height”, […]