Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions Find Browser & it's version using jQuery

Have Programming Question? Ask it here!
 
 
 


samar
Find Browser & it's version using jQuery
1 Answer(s)      3 years and 7 months ago
Posted in : JavaScript Questions


Hi sir

I heard that JQuery have some method which can be used to find the Browser name & its version.

I need the code which checks the browser and if it is "Mozilla", it will show its version & & display some message in alert box.

Please provide me code ASAP.


Advertisement
View Answers

December 15, 2010 at 3:17 PM


Hi Samar

The code according to the description provided by you is given below :

<html>
<head>
  <style>
  p { color:green; font-weight:bolder; margin:3px 0 0 10px; }
  div { color:blue; margin-left:20px; font-size:14px; }
  span { color:red; }
  </style>
  <script src="jquery-1.4.2.js"></script>
</head>
<body>
    <p>Browser info:</p>
<script>
    jQuery.each(jQuery.browser, function(i, val) {
      $("<div>" + i + " : <span>" + val + "</span>")
                .appendTo(document.body);
    });
    //Alerts "Do stuff for firefox 3" only for firefox 3 browsers.
    jQuery.each(jQuery.browser, function(i, val) {
   if(i=="mozilla" && jQuery.browser.version.substr(0,3)=="1.9")
      alert("Do stuff for firefox 3")
    });
    //Set a CSS property to specific browser. 
  jQuery.each(jQuery.browser, function(i) {
   if($.browser.msie){
      $("#div ul li").css("display","inline");
   }else{
      $("#div ul li").css("display","inline-table");
   }
 });
    </script>
</body>
</html>


Related Tutorials/Questions & Answers:
Find Browser & it's version using jQuery
Find Browser & it's version using jQuery  Hi sir I heard that JQuery have some method which can be used to find the Browser name & its version. I need the code which checks the browser and if it is "Mozilla", it will show
The scroll browser event of jQuery
The scroll browser event of jQuery In this tutorial ,we will print message on browser's window scrolling using scroll browser event of jQuery. In this example, some paragraphs are written , when we scroll down, a message
Advertisements
How to Find PHP version and configuration?
How to Find PHP version and configuration?  Find PHP version and configuration   If you want to find the version of PHP, you can just run...: http://www.phpzag.com/find-php-version-and-configuration
How to find version of Java installed on my computer? - Java Beginners
How to find version of Java installed on my computer?  How to get... with many more new features.How to find version of Java installed on my computer?To find out the version of Java installed on your computer, just type Java
Using the jQuery Transform plug-in(XSLT)
Using the jQuery Transform plug-in(XSLT)       Using the jQuery Transform plug-in(XSLT... Language Transformations ). The jQuery Plugin we are using
Vertical news slider using jquery
Vertical news slider using jquery  how to creatw vertical news slider using jquery Sorry for wrong category but i cant get my jquery category
Show Limited Data Using jquery
Show Limited Data Using jquery  How to show limited results in JQuery... it using JQuery?   See the JQuery example to show the limited fetch results in JQuery. var comments = $('.description_text').size(); if (comments >
Html form validation using jquery
Html form validation using jquery  Hi i am using form with html. Form elements like textbox, radio,checkbox,listbox i was used now how to validate the elements using submit jquery option
HTML form validation using jquery
HTML form validation using jquery  Is there any way for validating html elements common under a class by giving its class name in jquery validation code..that means validating all elements by using its class name if those
jQuery Demos
up on hover using jQuery plug in "jQuery. browser " utility... are providing the demo examples of jQuery that you can run in your browser... in different file Display current time using jQuery & JSP
jQuery auto complete through database using JSP shows error
jQuery auto complete through database using JSP shows error  The tutorial on jQuery titled "jQuery auto complete through database using JSP" shows error on browser when I try to select the one in the dropdown. Please help
application using AJAX and JQuery and also use JSP
application using AJAX and JQuery and also use JSP   i need create an application using AJAX and JQuery and also use JSP
Disabling submit button using jQuery
Disabling submit button using jQuery  Hello Sir I want to know - is there any way or approach to disable client side form's "Submit" button. Please give code also.   For all submit buttons, via JQuery, it'd
Show pdf's in web browser by using jsp?
Show pdf's in web browser by using jsp?  Hi, I want to display pdf file in browser by clicking the link, available in JSP page. When am trying to do this by using Anchor tag with absolute path, it is showing the error as: Http
How to write a search functionality using javascript/jquery
How to write a search functionality using javascript/jquery   How to write a search functionality using javascript/jquery for ex: im searching "s" names it wil display "s" names
Using the jQuery event object
Using the jQuery event object       Using the jQuery event object JQuery... to these standards, this system normalize the event object. jQuery. Event
opening new browser with new JSESSIONID using java
opening new browser with new JSESSIONID using java  I am facing following problem, I am trying to open a new browser using java. First i have opened one IE browser and manually. And i ran my LaunchURL.java file, it is opening new
Form validation Using Jquery Plugin
Form validation Using Jquery Plugin  Hello sir I want to implement form validation using JQuery Plug-in. My code is : <html> <style type...;/form> </body> </html> Please provide me JQuery code regarding
What is jQuery?
What is jQuery? jQuery is a multi-browser JavaScript library that makes... applications. Till date jQuery v 2.0.0 is the latest version being used. Earlier... and develops web pages that are compatible to most of the browser. jQuery
browser
browser  how to make a browser
Using the QUnit to test jQuery application
Using the QUnit to test jQuery application       Using the QUnit to test jQuery application Using Qunit , testing of JQuery become very easy and efficient
Calculating square root using JSP & jQuery
Calculating square root using JSP & jQuery In this tutorial, we will find square root of any number with the help of JSP & jQuery. In this example, we have a JSP file which have jQuery 'javascript' : index.jsp <
Hide hyperlink using jQuery
Hide hyperlink using jQuery In this tutorial, we will discuss about how to hide hyperlink after clicking it using jQuery. In the below example , a hyperlink...; }); OUTPUT : After click ,it will disappear from browser.  Download Source Code
Crop image Using JQuery, servlet or JSP.
Crop image Using JQuery, servlet or JSP.  Hi sir I need the code of Cropping image using JQuery with the help of servlet or JSP. I need both the code Client side as well as of server side. Please Help me
JQuery
using url of the doctors, use jquery autocomplete...JQuery  my requirement is: as i have a list of doctors in my table in the DB. a textbox is there in the browser it should display all the doctors
Closing any kind of browser window without confirmation using javascript
Closing any kind of browser window without confirmation using javascript  Here is my requirement, I have to close a browser window on onload event... version. Presently am using IE8. Thanks, Suresh
check username availability using JSP & JQuery
check username availability using JSP & JQuery  Hi sir I want check username availability using JSP & JQuery. Please add code with your answer. Thnks in advance
Test hidden element using JQuery
Test hidden element using JQuery  Suppose i have an element which i am hiding and showing, using .hide(), .show() or .toggle().How do you test to see... using following code snippet : $(element).is(":visible") Hope this will helpful
Implementing Digits restriction Using JQuery
Implementing Digits restriction Using JQuery  Hi Sir I have following field in my html form : <div>Age<input type="text" name="quantity.... Please provide code.   You can implement these two things using ASCII code
Replace broken Image using JQuery
Replace broken Image using JQuery  Sir My web page contains a lot of images. But when it will not loaded properly, it shows a broken image. How can I fix it so that broken image will be replaced by error image automatically
browser
browser  hello this is saurav srivastav, thank you for sending the cvode for creating the menu item, but I want the code for file open and save frame in the swing because I am working on my project Browser and one more problem
JQuery
JQuery  hi there, I am just beginner for jQuery and i want to know-what is jQuery ? How it is better than JavaScript ?   jQuery is a lightweight cross-browser JavaScript library that emphasizes interaction
Auto grow Text Area using jQuery plug-in
Auto grow Text Area using jQuery plug-in  Hi sir How can we make a textarea auto grow ? What is the name of the plug-in used for auto grow text area. Please mention code with your reply
select value from autocomplete textbox using jquery in jsp from database.
select value from autocomplete textbox using jquery in jsp from database. ... but was unable to find out exact way to fullfill the solution of selecting value from autocomplete textbox using jquery in jsp from mysql database. Kindly send me
select value from autocomplete textbox using jquery in jsp from database.
select value from autocomplete textbox using jquery in jsp from database... the tutorials but was unable to find out exact way to fullfill the solution of selecting value from autocomplete textbox using jquery in jsp from mysql database
jquery
jquery  how to display the leaves taken or holidays of the year or half working days in a calendar in some colors to identify the days using jquery plugin
closing the internet explorer window of any version without confirmation using javascript
closing the internet explorer window of any version without confirmation using... support all the versions of IE. In future if new version comes. It should support that new version also. any help is appreciated. Thanks, suresh
jquery highlight textbox using jQuery
Content highlighting using jQuery In this section , you will learn how to highlight input row or group of input row using jQuery. In the below given example...;Content highlighting in form using jQuery - Example</title> <style>
JQuery
JQuery  my requirement is: as i have a list of doctors in my table in the DB. a textbox is there in the browser it should display all the doctors..., use jquery autocomplete
jQuery Load Content
jQuery Load Content       In this section you will learn how to load content of a text file using jQuery and show it on the use browser. This example shows you how to load the content
find a substring by using I/O package
find a substring by using I/O package  Write a java program to find a sub string from given string by using I/O package
how to validate the telephone number without using jquery in html with javascript
how to validate the telephone number without using jquery in html with javascript  how to validate the telephone number without using jquery in html with javascript
How to Collapse Dropdowns on mouseclick on scrollbar in Safari Browser using javascript
How to Collapse Dropdowns on mouseclick on scrollbar in Safari Browser using javascript  How to Collapse Dropdowns on mouseclick on scrollbar in Safari Browser using javascript
how can clear the browser cache memory using java script
how can clear the browser cache memory using java script  how can clear the browser cache memory using java script
JQuery
JQuery  how to use jquery
Getting the ID of the element that fired an event using JQuery
Getting the ID of the element that fired an event using JQuery  Hello sir I want to know-Is there any way to get the ID of the element that fires... to understand the concept. Thanks in advance   Dear friend In jQuery
JQuery
JQuery  how to create jquery auto-complete textbox ? in which data...://www.roseindia.net/tutorial/jquery/autoSuggestTextbox.html   thank you for fast reply. when i m using key-down than cursor is not going down.i m not able
find all unique character in string using java
find all unique character in string using java  example: hello how are you. output should be waryu
Hide boxes by clicking on it using jQuery
Hide boxes by clicking on it using jQuery In this tutorial , we will discuss about how to hide boxes by clicking on it using jQuery. In the given below...; Description of the program : Inside "div" ,box is created using '
The 'offset' method of jQuery to find the co-ordinate
The 'offset' method of jQuery to find the co-ordinate In this tutorial , we will discuss about 'offset' method of jQuery . This method is used to find the coordinate of the clicked html element. In this example we also
Advertisements
 

 

 

DMCA.com