Guest User

Untitled

a guest
Jun 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. var _self = this;
  2. $(".select_all").click(function() {
  3. this.checked = !(this.checked == true);
  4. if ($(this).text() == 'Select all') { $(this).text('Select none') } else { $(this).text('Select all') }
  5. $(".checkbox_c > input:checkbox").attr("checked", function() {
  6. this.checked = !(this.checked == true);
  7. });
  8. });
  9. var inputChecked = 0;
  10. basketItems = [];
  11. $(".checkbox_c > input:checkbox, .select_all").click(function() {
  12. $(".checkbox_c input:checkbox").each(function() {
  13. if (this.checked == true) {
  14. _self.inputChecked++;
  15. basketItems.push($(this).attr('id'));
  16. }
  17. })
  18. });
  19.  
  20. $(".action_c dl dt").click(function() {
  21. gCjs.log(basketItems);
  22. if (_self.inputChecked > 0) {
  23. $('.action_c dl dd .notice').hide();
  24. $('.action_c dl dd .addresses_dropdown').show();
  25. $('.action_c dl dd .gifts_dropdown').show();
  26. } else {
  27. $('.action_c dl dd .notice').show();
  28. $('.action_c dl dd .addresses_dropdown').hide();
  29. $('.action_c dl dd .gifts_dropdown').hide();
  30. }
  31. $(this).next("dd").toggle();
  32. });
Add Comment
Please, Sign In to add comment