Open In App

jQuery :image Selector

Last Updated : 10 Jul, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

The jQuery :image selector is used to select the input elements with a type equal to the image. 

Syntax: 

$(":image")

Parameter: :enabled selector: It is used for selecting HTML input elements for changing its properties, e.g. background-color, etc. 

Example 1: 

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>:image Selector</title>
    <script src=
    </script>
    <script>
        $(document).ready(function () {
            $(":image").css("height", "50px");
        });
    </script>
</head>
 
<body>
    <center>
        <form action="#">
            <h1>Welcome to GeeksforGeeks!</h1>
            Image
            <input type="image" src="logo.png"
                   width="31" height="30">
        </form>
    </center>
</body>
 
</html>


Output: It changes the height of the image:

  

Example 2: 

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>:image Selector</title>
    <script src=
    </script>
    <script>
        $(document).ready(function () {
            $(":image").css("width", "150px");
        });
    </script>
</head>
 
<body>
    <center>
        <div style="background-color: #ffff94;">
            <h1>Welcome to GeeksforGeeks!.</h1>
            Image
            <input type="image" src="logo.png"
                   width="31" height="30">
        </div>
    </center>
</body>
 
</html>


Output:

 



Previous Article
Next Article

Similar Reads

jQuery :input Selector
The jQuery :input selector in jQuery is used to select input elements. This selector is also used with button element. Syntax: $(":input")Note: jQuery :input selector not only selects input elements but also Buttons, Dropdowns, and Textarea elements. Example 1: This example use :input selector to count all input elements. C/C++ Code &lt;!DOCTYPE ht
2 min read
jQuery :nth-of-type() Selector
The :nth-of-type() is an inbuilt selector in jQuery, used to select all the nth-child elements of the specified parent. Syntax: parent_name : nth-of-type(n|even|odd|algebraic equation)Parameters: It takes a parameter n | even | odd | algebraic equation. ValueDescriptionnSelect the child present at nth index (starting from 1). n must be an integer.e
3 min read
jQuery :enabled Selector
The jQuery :enabled selector is used to select all enabled form elements. Syntax : $(":enabled")Parameter: :enabled selector: It is used for selecting HTML elements that support the disabled attribute. i.e button tag, input tag, optgroup tag, option tag, select tag and textarea tag.Example 1: C/C++ Code &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head
1 min read
jQuery element Selector
jQuery is an open-source JavaScript library that simplifies the interactions between an HTML/CSS document, or more precisely the Document Object Model (DOM), and JavaScript. Elaborating the terms, it simplifies HTML document traversing and manipulation, browser event handling, DOM animations, Ajax interactions, and cross-browser JavaScript developm
1 min read
jQuery :last Selector
The jQuery :last Selector is used to select the last element of the specified type. Syntax: $(":last")Example 1: In this example, we will select the last &lt;p&gt; element by using jQuery :last Selector. C/C++ Code &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script src= &quot;https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
1 min read
jQuery :button Selector
The jQuery :button selector selects button elements and input elements with type="button". The button element is not selected if we use input=" button" as a selector. Syntax: $(":button") Example 1: In this example, we are using jQuery: button Selector. C/C++ Code &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;jQuery :button Selector
1 min read
jQuery :animated Selector
The jQuery :animated Selector is an inbuilt selector which is used to select the element that is currently animated. Syntax: $(:animated)Below examples illustrate the animated selector in jQuery: Example 1: In this example, we will select the animated element by using jQuery animated Selector. C/C++ Code &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head
2 min read
jQuery :header Selector
The jQuery :header Selector is used to select all the heading elements that are from (&lt;h1&gt; to &lt;h6&gt;). Syntax: $(":header") Example 1: Change the color of all headings to green. C/C++ Code &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;jQuery :header Selector&lt;/title&gt; &lt;script src= &quot;https://ajax.googleapis.com/aj
1 min read
jQuery #id Selector
jQuery is an open-source JavaScript library that simplifies the interactions between an HTML/CSS document, or more precisely the Document Object Model (DOM), and JavaScript. Elaborating on the terms, it simplifies HTML document traversing and manipulation, browser event handling, DOM animations, Ajax interactions, and cross-browser JavaScript devel
1 min read
jQuery .class Selector
The jQuery .class selector specifies the class for an element to be selected. It should not begin with a number. It gives styling to several HTML elements. Syntax: $(".class") Parameter: class: This parameter is required to specify the class of the elements to be selected.Example 1: In this example, we will select a class by using jQuery .class Sel
1 min read