Skip to content
Advertisement

How to detect chrome and safari browser (webkit)

I am trying to detect the chrome and safari browser using jquery or javascript. I thought we are not supposed to use jQuery.browser. Are there any suggestions here? Thanks a lot! Answer If you dont want to use $.browser, take a look at case 1, otherwise maybe case 2 and 3 can help you just to get informed because it

Add/remove class with jquery based on vertical scroll?

So basically I’d like to remove the class from ‘header’ after the user scrolls down a little and add another class to change it’s look. Trying to figure out the simplest way of doing this but I can’t make it work. CSS HTML I’m sure I’m doing something very elementary wrong. Answer Fiddle Also, by removing the clearHeader class, you’re

Determining a page is outdated on github pages

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 cache. How can a script running in a page determine that

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 Carousel Not working, but nothing seems to help. Any ideas would be appreciated. You can view it and its linked

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 in ver 1.9, So Use Jquery Migrate

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 I directly

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

Advertisement