jQuery attribute selector variable

后端 未结 3 1978
终归单人心
终归单人心 2020-11-27 19:50

I have a selectbox with several options - each of these option values correspond to a \"value\" attribute on some images below. The functionality I want is when selectbox va

3条回答
  •  时光取名叫无心
    2020-11-27 20:06

    To the above, it no longer works as mentioned above (, though it might also be only my code). The single quotation messes up the code. The following code works

    As of jQuery 3.2.1 and later

    $("#clickmap a[gruppe="+gruppeId+"]").children("path").addClass('lastClicked');
    

提交回复
热议问题