2012-08-10 80 views
14

更新的jQuery 1.8.0後,JScrollPane中給了我這個錯誤:JScrollPane的和jQuery 1.8.0

Uncaught Error: Syntax error, unrecognized expression: [type=text/javascript],not([type])

在這一行:

$("script",elem).filter('[type=text/javascript],not([type])').remove(); 

誰能幫助?

由於

+1

你確定JScrollPane的兼容用最新版本的jquery – 2012-08-10 14:30:12

+13

它應該是'$(「script」,elem).filter('[type =「text/javascript」],:not([type])')。remove();' – Esailija 2012-08-10 14:31:02

+0

Thanks @Esailija,它現在正在工作。 – rgomesf 2012-08-10 16:23:35

回答

7
  1. not是僞選擇器,應由用作:not()
  2. 雖然由屬性名稱 - 值用作selector[attr="value"]濾波:前面 - [type="text/javascript"]

所以它應該是 -

.filter('[type="text/javascript"],:not([type])') 
+0

是的,我認爲jScrollpane需要這樣做 – rgomesf 2012-09-03 13:11:22