Wednesday 9 August 2023

Select Child element and add css using Jquery

 Jquery  has a powerful DOM selection feature. You can select all child elements from a div or any other container and add CSS to those child elements.

Select all images from a div and change CSS using jquery


In the above UI , When a user clicks on an image A border is applied with padding. But when while click on another image border is applied but it needs to clear the previously selected image border. So the code given below help you to achieve this.
Border of all images inside of div id=''imgcon" will be removed by jquery and add a border on the selected image


<div id="imgcon">
    <img src="/Upload/notesimg/1014.jpg" id="img1014" onclick="ChangeCSS('img1014')" >
    <img src="/Upload/notesimg/1014.jpg" id="img1015" onclick="ChangeCSS('img1015')">
    <img src="/Upload/notesimg/1014.jpg" id="img1016" onclick="ChangeCSS('img1016')">
</div>
<script>
    function ChangeCSS(id) {    

        $("#imgcon img").css("border", "none");
        $('#img' + id).css({ "border": "solid 2px red", "padding": "2px" });

    }
</script>

Sunday 30 July 2023

Internet of Things and its applications (M4-R5) July 2022 Set 2

 Solved : Internet of Things and its applications (M4-R5) July 2022 Set 2

1. Where FootNote is Located in LibreOffice Writer ?
(A) Header of Page (B) Top of page
(C) Middle of Page (D) Bottom of Page

2. Which shortcut key is used to print the web page for Windows OS ?
(A) Command+P (B) Ctrl+P
(C) Caps+P (D) None of the above

Sunday 23 July 2023

Internet of Things and its applications (M4-R5) July 2022 Set 1

Solved  Internet of Things and its applications (M4-R5) July 2022  Set 1

1. Which parameter is taken through pulseIn() in ultrasonic sensor?
(A) Voltage (B) Frequency (C) Time duration (D) Distance


2. Which of the following is NOT a hard skill?
(A) Typing Speed (B) Machine Operation
(C) Time Management (D) Coding

Sunday 16 July 2023

Solved paper Programming and Problem Solving Through Python M3-R5 Set 2

 Solved paper Programming and Problem Solving Through Python M3-R5 Set 2 | NIELIT O Level

What will be output for the following code ? import numpy as np
a = np.array([[1,2,3],[0,1,4],[11,22,33]])
print (a.size)
(A) 1 (B) 3 (C) 9 (D) 4