Skip to content
Advertisement

Tag: cross-browser

Javascript – What is alternative to find function?

I am using find () function for one of my project. Official document https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find says that Internet Explorer is not supported. What else can I use? Answer A polyfill is a code that provides the functionality that you normally expect the browser to provide you natively. Here is the polyfill for Array.find

Are there any browser-native 360 spin viewers?

There are several plugins for viewing interactive 360-spin images of products, such as this: https://www.ajax-zoom.com/index.php?cid=home&tag=spin360 However, my question is whether there are any current or proposed solutions for this that are browser-native, so don’t require any plugins? One analogy would be how gifs are now natively supported by most browsers without the need for a plugin. Many thanks! Answer First,

setTimeout function not working on firefox

I am trying to use <input type=”submit” name=”add” class=”buy” onClick=”setTimeout(‘history.go(0);’,2000);”/> It reloads the page on click after two seconds in chrome but it doesnt work in Firefox. I went through this Why does window.location.reload need setTimeout to work in firefox. It still didn’t work for me. Please help me find a way I can achieve my required functionality accross both

Going back to previous page using javascript

Is using JavaScript the most efficient way of navigating back to the previous page when a link or button is clicked? What if JavaScript is disabled on the user’s end (Which most people don’t)? Are there any known issues with cross-browsers? Are there any browsers that don’t support the history.back() function? I am using this code to go back to

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

Advertisement