Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Adding Individual "select all" button in HTMl
Old 08-01-2012, 04:08 AM Adding Individual "select all" button in HTMl
Junior Talker

Posts: 1
Trades: 0
<html>
<head>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<style>
.plusimageapply{
list-style-image:url(plus.png);
cursorointer;
}
.minusimageapply{
list-style-image:url(minus.png);
cursorointer;
}
.selectedimage{
list-style-image:url(selected.png);
cursorointer;
}
</style>
</head>
<body>
<div id="a">
<ul>
<li class="category">Abortion<ul>
<input type="checkbox" id="selectall"/>Select All<br />
<input type="checkbox" class="case" name="case" value="1"/>abortion:Abortion information excluding when related to religion<br />
</li>
</ul>
</div>

<div id="b"><ul><li class="category">Ads<ul>
<input type="checkbox" id="selectall"/>Select All<br />
<input type="checkbox" class="case" name="case" value="1"/>ads:Advert servers and banned URLs<br />
</li></ul></div>

<div><ul><li class="category">News And Media<ul>
<input type="checkbox" class="case" name="case" value="1"/>news:News sites<br />
<input type="checkbox" class="case" name="case" value="1"/>culnary:Sites about cooking et al<br />
<input type="checkbox" class="case" name="case" value="1"/>entertainment:Sites that promote movies, books, magazine, humor<br />
<input type="checkbox" class="case" name="case" value="1"/>gambling:Gambling sites including stocks and shares<br />
<input type="checkbox" class="case" name="case" value="1"/>radio:non-news related radio and television<br />
<input type="checkbox" class="case" name="case" value="1"/>weather:Weather news sites and weather related<br />
</ul></div>

<div><ul><li class="category">Education<ul>
<input type="checkbox" class="case" name="case" value="1"/>frencheducation:Sites to do with french education<br />
</li></ul></div>

<div><ul><li class="category">Games<ul>
<input type="checkbox" class="case" name="case" value="1"/>sportnews:Sport news sites<br />
<input type="checkbox" class="case" name="case" value="1"/>sports :All sport sites<br />
<input type="checkbox" class="case" name="case" value="1"/>onlinegames :Online gaming sites<br />
<input type="checkbox" class="case" name="case" value="1"/>games:Game related sites<br />
</li></ul></div>

<div><ul><li class="category">Social Networking<ul>
<input type="checkbox" class="case" name="case" value="1"/>dating:Sites about dating<br />
<input type="checkbox" class="case" name="case" value="1"/>mail :Webmail and email sites<br />
<input type="checkbox" class="case" name="case" value="1"/>news :News sites<br />
<input type="checkbox" class="case" name="case" value="1"/>socialnetworking:Social networking websites<br />
<input type="checkbox" class="case" name="case" value="1"/>instantmessaging:Sites that contain messenger client download and web-based messaging sites<br />
</li></ul></div>

<div><ul><li class="category">Shopping<ul>
<input type="checkbox" class="case" name="case" value="1"/>ecommerce:Sites that provide online shopping<br />
<input type="checkbox" class="case" name="case" value="1"/>shopping:Shopping sites<br />
</li></ul></div>

<div><ul><li class="category">News And Media<ul>
<input type="checkbox" class="case" name="case" value="1"/>weather:Weather news sites and weather related<br />
<input type="checkbox" class="case" name="case" value="1"/>gambling:Gambling sites including stocks and shares<br />
<input type="checkbox" class="case" name="case" value="1"/>news :News sites<br />
<input type="checkbox" class="case" name="case" value="1"/>radio :non-news related radio and television<br />
<input type="checkbox" class="case" name="case" value="1"/>radio :non-news related radio and television<br />
</li></ul></div>

<div><ul><li class="category">Adult<ul>
<input type="checkbox" class="case" name="case" value="1"/>adult:Sites containing adult material such as swearing but not porn<br />
<input type="checkbox" class="case" name="case" value="1"/>artnudes:Art sites containing artistic nudity<br />
<input type="checkbox" class="case" name="case" value="1"/>porn:Pornography<br />
<input type="checkbox" class="case" name="case" value="1"/>sexuality:Sites dedicated to sexuality, possibly including adult material
<br />
<input type="checkbox" class="case" name="case" value="1"/>mixed_adult Mixed adult content sites<br />
</li></ul></div>

<div><ul><li class="category">Spyware<ul>
<input type="checkbox" class="case" name="case" value="1"/>antispyware:Sites that remove spyware<br />
</li></ul></div>

<div><ul><li class="category">Banking<ul>
<input type="checkbox" class="case" name="case" value="1"/>banking:Banking websites<br />
</li></ul></div>

<div><ul><li class="category">Blog<ul>
<input type="checkbox" class="case" name="case" value="1"/>blog:Journal/Diary websites<br />
</li></ul></div>

<div><ul><li class="category">Kids<ul>
<input type="checkbox" class="case" name="case" value="1"/>childcare:Sites to do with childcare<br />
<input type="checkbox" class="case" name="case" value="1"/>kidstimewasting:Sites kids often waste time on<br />
</li></ul></div>

<div><ul><li class="category">Blog<ul>
<input type="checkbox" class="case" name="case" value="1"/>blog:Journal/Diary websites<br />
</li></ul></div>

<div><ul><li class="category">Job Search<ul>
<input type="checkbox" class="case" name="case" value="1"/>jobsearch:Sites for finding jobs<br />
</li></ul></div>

<div><ul><li class="category">Travel<ul>
<input type="checkbox" class="case" name="case" value="1"/>blog:Journal/Diary websites<br />
</li></ul></div>

<script type="text/javascript">
$(document).ready(function() {
$('li.category').addClass('plusimageapply');
$('li.category').children().addClass('selectedimag e');
$('li.category').children().hide();
$('li.category').each(
function(column) {
$(this).click(function(event){
if (this == event.target) {
if($(this).is('.plusimageapply')) {
$(this).children().show();
$(this).removeClass('plusimageapply');
$(this).addClass('minusimageapply');
}
else
{
$(this).children().hide();
$(this).removeClass('minusimageapply');
$(this).addClass('plusimageapply');
}
}
});
}
);
});
</script>
<script type="text/javascript" >
$(function(){
$("#selectall").click(function () {
$('#a .case').attr('checked', this.checked);
});
$("#a .case").click(function(){

if($("#a .case").length == $("#a .case:checked").length) {
$("#selectall").attr("checked", "checked");
} else {
$("#selectall").removeAttr("checked");
}
});
})
</script>
<script type="text/javascript" >
$(function(){
$("#selectall").click(function () {
$('.case').attr('checked', this.checked);
});
$(".case").click(function(){

if($(".case").length == $(".case:checked").length) {
$("#selectall").attr("checked", "checked");
} else {
$("#selectall").removeAttr("checked");
}
});
})
</script>

</body>
</html>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


I want to include "select all" check box in individual categories.......I spent lot of time for this but am not getting .

PLease help me for this problem.


Pervez
PervezMulla is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-01-2012, 04:45 PM Re: Adding Individual "select all" button in HTMl
chrishirst's Avatar
Defies a Status

Posts: 43,971
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.candsdesign.co.uk/article...ll-checkboxes/
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Adding Individual "select all" button in HTMl
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14060 seconds with 11 queries