Breaks node edit page!

morningtime - July 4, 2009 - 10:48
Project:Better Select
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Error: [Exception... "'Syntax error, unrecognized expression: [@type="checkbox"]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]

@type="checkbox" is not a normal js thing?

This is in betterselect.js >

Drupal.behaviors.initBetterSelect = function(context) {
  $('.better-select .form-checkboxes input[@type="checkbox"]').click(function(){
    this.checked ? $(this).parent().parent().addClass('hilight') : $(this).parent().parent().removeClass('hilight');
  }).filter(":checked").parent().parent().addClass('hilight');
}

#1

kenorb - September 16, 2009 - 10:32

#2

kenorb - September 24, 2009 - 12:04

Try input:checked instead of input[@type=checkbox]

#3

markabur - October 22, 2009 - 00:14

yes, related to installing the jquery update module.

what works for me is input[type=checkbox] instead of input[@type=checkbox] -- which makes sense as the former is the correct css syntax. i guess jquery is pickier than it used to be.

 
 

Drupal is a registered trademark of Dries Buytaert.