Github pages sets very aggressive cache headers (Cache-Control: max-age=86400 1 day, Expires 1 month ahead) on all served content. If you update your pages and push to github, people revisiting the pages who have already got cached copies will not get the new pages without actually cleaning their browser cach…
Tag: javascript
Bootstrap Carousel Transitions and Prev/Next Buttons Not Working
I’m trying to implement the twitter bootstrap carousel, and it’s not working – it doesn’t switch images automatically, AND the previous/next buttons don’t work. I’ve tried switching to jquery 1.7.1 as suggested on Bootstrap Carousel Not Automatically Sliding and Bootstrap C…
How do I get the quotient as int and remainder as a floating point in JavaScript
On my calculator when I do 18/7 I get 2.5714285714285714285714285714286. From my super limited Math skills 2 is the quotient and .5714285714285714285714285714286 is the remainder. How can I model this in JavaScript? Thanks! Answer
How to capture browser close event and make a request to web service method on that event through JavaScript
I have a application where I am doing recording through a third party device using it’s API on my page. Recording is started and stopped through a asp.net web service.. I am able to start and stop the recording through JavaScript in normal cases and the functionality works fine in all browsers. But, onc…
Getting a browser’s name client-side
Is there any object or method that returns data about the browser, client-side? For example, I need to detect if the browser is IE (Interner Explorer). Following is the code snippet. Is there a better way? Answer EDIT: Since the answer is not valid with newer versions of jquery As jQuery.browser is deprecated…
Three.js WebGL texture shows up black on plane
So basically, I have a scene in WebGL with 2 planes. One of them has a transparent texture on it and it shows up fine. The other is supposed to have a high res, non-transparent texture loaded up on it and it is used as a background. I can’t figure out why the background plane isn’t working, since …
Using panTo and panBy simultaneously
I would like to create a map with some pins on it (using leaflet). When the user clicks on one of them, the map should move until the pin is at the bottom of the map in the horizontal center. My map is 400 pixels hight, so I’m using this code: It’s working like a charm – only the IE
infinite scroll doesn’t stop when contents finish
hi am having a problem with infinite scroll functionality, when all the contents have been displayed it still continues to scroll (strange behavior). i am looking for a way to stop the infinite scroll when all contents are displayed here is my code i have bee working on this days now….please heeeeeeeeee…
Is there any difference between a global variable and a property of the Global Object
I was reading the following analysis from David Mark about the js framework “Sencha”: https://gist.github.com/3279190 and in there he states… What they wanted was a global variable, but they ended up with is a property of the Global Object. According the specifications and (and implementatio…
Does there exist a cross-browser JavaScript library for simulating keyboard manipulation of an element?
I’m well aware of the standard event firing mechanisms for browsers, but I have a need for a JavaScript library that will simulate cursor and insertion point navigation via the keyboard. In particular, I need a library that will allow me to move the insertion point, but will also handle expanding or col…