Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
V2ray VPN for Tunneling
hu KANNA
Updated:
Oct 22, 2026
FREE SEO Check & Google Maps Check for Sri Lankan Businesses | Web Design, Website Price Rs 14,900 |
LankaSolve
Updated:
Oct 20, 2026
ඕනම රටකට සෙට් වෙන CV එකක්
ErMurazor
Updated:
Oct 17, 2026
Hambantota
7 Acres Beachfront Land For Sell DownSouth , PerPerch Price 420 000
1024 Digital
Updated:
Oct 14, 2026
Baseus PI LITE INDOOR CAMERA
ErMurazor
Updated:
Oct 12, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
JQuery help
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="GT9" data-source="post: 20523365" data-attributes="member: 478359"><p><span style="font-size: 15px"><span style="color: Blue">මචංල මම JQuery ගැන වැඩිය දන්නෑ. මට මචංල මේක කරන විදිය පොඩ්ඩක් පැහැදිලි කරල දෙන්න. මම කරන්න උත්සාහ කරන දේ සරල වෙන්න බොහොම සරල කෝඩ් එකක් ලිව්ව. මේ තියෙන්නේ ඒක. ටෙස්ට් කරන්න ඔය කෝඩ් එක කොපි කරල blank .html පේජ් එකකට සේව් කරල browser එකෙන් Open කරන්න. </span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue">[PHP]<!DOCTYPE html></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"><html></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"><head></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <title></title></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></head></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"><body></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <!DOCTYPE html></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"><html lang="en"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <head></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <meta charset="utf-8"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <meta http-equiv="X-UA-Compatible" content="IE=edge"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <meta name="viewport" content="width=device-width, initial-scale=1"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <title>Bootstrap 101 Template</title></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <!-- Bootstrap --></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <link href="css/bootstrap.min.css" rel="stylesheet"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <!--[if lt IE 9]></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <![endif]--></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> </head></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <body></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <button>hide me 1</button></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <h2 hideme>hide me 1</h2></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <button>hide me 2</button></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <h2 hideme>hide me 2</h2></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <button>hide me 3</button></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <h2 hideme>hide me 3</h2></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <!-- Include all compiled plugins (below), or include individual files as needed --></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <script src="js/bootstrap.min.js"></script></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> <script type="text/javascript"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> $(function() {</span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> var button = $('button');</span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> button.click(function() {</span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> $('h2[hideme]').hide();</span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> });</span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> });</span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> </script></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"> </body></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></html></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></body></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></html>[/PHP]</span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue">මට මචංල වෙන්න ඕන ඔය එක් එක් බටන් එක click කරාම ඒකට අදාල h2 එක විතරක් hide වෙන්න. ඔතනදි නම් එක button එකක් click කරාම ඔක්කොම H2 hide වෙනවනේ. <img src="/styles/default/xenforo/smilies/default/D.gif" class="smilie" loading="lazy" alt=":D" title="Big grin :D" data-shortname=":D" /> </span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"><span style="color: Red">මට මචංල මේක එකින් එක id දාල නෙමේ කරගන්න ඕන. එකම කෝඩ් එකෙන් මේ වගේ elements group ඕන ප්රමානයක් handle කරන්න පුලුවන් වෙන්න ඕන. අන්න එතන තමයි වැදගත්. නැත්නම් element එකෙන් එකට js කෝඩ් එක update කරන්න වෙනව. <img src="/styles/default/xenforo/smilies/default/D.gif" class="smilie" loading="lazy" alt=":D" title="Big grin :D" data-shortname=":D" /></span></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p><p><span style="font-size: 15px"><span style="color: Blue"></span></span></p></blockquote><p></p>
[QUOTE="GT9, post: 20523365, member: 478359"] [SIZE="4"][COLOR="Blue"]මචංල මම JQuery ගැන වැඩිය දන්නෑ. මට මචංල මේක කරන විදිය පොඩ්ඩක් පැහැදිලි කරල දෙන්න. මම කරන්න උත්සාහ කරන දේ සරල වෙන්න බොහොම සරල කෝඩ් එකක් ලිව්ව. මේ තියෙන්නේ ඒක. ටෙස්ට් කරන්න ඔය කෝඩ් එක කොපි කරල blank .html පේජ් එකකට සේව් කරල browser එකෙන් Open කරන්න. [PHP]<!DOCTYPE html> <html> <head> <title></title> </head> <body> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <title>Bootstrap 101 Template</title> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <button>hide me 1</button> <h2 hideme>hide me 1</h2> <button>hide me 2</button> <h2 hideme>hide me 2</h2> <button>hide me 3</button> <h2 hideme>hide me 3</h2> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> <script type="text/javascript"> $(function() { var button = $('button'); button.click(function() { $('h2[hideme]').hide(); }); }); </script> </body> </html> </body> </html>[/PHP] මට මචංල වෙන්න ඕන ඔය එක් එක් බටන් එක click කරාම ඒකට අදාල h2 එක විතරක් hide වෙන්න. ඔතනදි නම් එක button එකක් click කරාම ඔක්කොම H2 hide වෙනවනේ. :D [COLOR="Red"]මට මචංල මේක එකින් එක id දාල නෙමේ කරගන්න ඕන. එකම කෝඩ් එකෙන් මේ වගේ elements group ඕන ප්රමානයක් handle කරන්න පුලුවන් වෙන්න ඕන. අන්න එතන තමයි වැදගත්. නැත්නම් element එකෙන් එකට js කෝඩ් එක update කරන්න වෙනව. :D[/COLOR] [/COLOR][/SIZE] [/QUOTE]
Insert quotes…
Verification
Dahaya deken beduwama keeyada?
Post reply
Top
Bottom