Apply "selection" to any HTML tag - EzyJSSelector

Hi Guys,

This program is the output of my discussion "Javascript advanced topic: conflict of this context".
Thanks to the repliers.

Pls download it and try as your requirement.

Bug reports and modification suggestions are welcome.

Rgds,
MS

EzyJSSelector.class-0.2.00.js

manual-EzyJSSelector-0.2.00.txt

Views: 5

Tags: Javascript, code, programming, selection

Comment

You need to be a member of MyanmarITPro - A Social Network for Myanmar IT Professionals to add comments!

Join MyanmarITPro - A Social Network for Myanmar IT Professionals

Comment by Moe Sweet on January 9, 2010 at 2:30pm
as far as i know, jquery also is an extension of Prototype JS.
Comment by Sean Lin on November 5, 2009 at 6:17pm
jQuery is so far the best and most lightweight out there compare to things like Prototype which is the library Scriptatculous relies on.
Comment by Moe Sweet on November 5, 2009 at 3:36pm
Comment by zin win maw on November 5, 2009 at 3:34pm
I am just beginner.I have no money to attend php class.So, how can I learn php by myself? Please give me advice !
Comment by Moe Sweet on June 11, 2009 at 10:08am
This is all I want to know about...
1.) jQuery is just a Javascript with advanced selector

It's really nice of you.
Comment by Ei Maung on June 11, 2009 at 10:04am
I'm afraid we'd lost control over our own codes.

You don't have to worry about it. For example: This is all jQuery...
$(document).ready(function(){
  $("#mydiv").html("Hello, World!");
});

This is mixing jQuery with pure javascript...
//ready method make sure the DOM tree is ready. more handy then onLoad()
$(document).ready(function(){
document.getElementById("mydiv").innerHTML = "Hello, World!";
});

See? You don't have to worry about lost control...

If you look into jQuery, you will know 2 things...

1.) jQuery is just a Javascript with advanced selector
2.) The slogan of jQuery (write less, do more)

And jQuery become main stream JS library for web development today. Google also use it and there were many really-cool plugins that you can easily integrate and implement. jQuery is really cool and I'm fell in love with it.

Actually, learning jQuery is definitely worth learning.
Comment by Moe Sweet on June 11, 2009 at 9:23am
We don't usually integrate 3rd party frameworks to our apps. I'm afraid we'd lost control over our own codes.
Scriptatculous is the only one we're using. They're so irresistible.
But thanks for the advise. I'll look into jQuery. Some of my friends already using it.
Comment by TWN on June 10, 2009 at 10:55pm
I really envy you can do this on your own. I have to learn jQuery to do those things.
Comment by Ei Maung on June 10, 2009 at 4:30pm
I believe you didn't try with jQuery. Right?

Select elements, bind event, and add class
//select with id
$("#elem").click(function(){
$("this").addClass("check");
});

//select with class
$(".elem").click(function(){
$("this").addClass("check");
});

//select div inside element
$("#elem div").click(function(){
$("this").addClass("check");
});

//select last p
$("p:last-child").click(function(){
$("this").addClass("check");
});

//bind click event to all link
$("a").each(function(){
$(this).click(function(){
//do something
});
});

//select all html elements with the way you can imagine

And Check this out...
Comment by Moe Sweet on June 10, 2009 at 3:42pm
Main purpose is to be able to run the script on any un-staged HTML tags.
It reads and attaches function to those so you can perform selection on those tags.
You wont need radio boxes or checkboxes to select items anymore which are ridiculous.

Basic features which should be done before v1.0.00 are...
Change CSS class names on hover also.
Define Single or Multi select.
Drag Multiselect
Shift + click. Control + click select.
Select all / inverse select / unselect all (already done).
Click outside, remove selection.

You're welcome for any suggestions.

Right now, i'm using it to select only files, (not folders), read from a directory. And then to apply some actions to the selected files. I used it with a tree structure.

You can also use it for tabular structure displays (such as grid) and block view data (like thumbnails).

BTW, this is an updated one.
I fixed a single bug so i didn't change the version.

EzyJSSelector.class-0.2.00.js

© 2014   Created by Ko Chit.

Badges  |  Report an Issue  |  Terms of Service