[jQuery] JQuery Selector and Java Script Variable

2008-10-13 Thread Shadi Almosri
Hiya, I've not been able to find an answer to this online! can someone point out the correct syntax for this: var myRel = $(this).attr("rel"); var largePath = $('a[rel*=' + myRel +']').attr("href"); Basicly the myRel gets set correctly, but how do i use the javascript variable as part of the jq

[jQuery] JQuery Selector and Java Script Variable

2008-10-13 Thread Shadi Almosri
Hiya, I've not been able to find an answer to this online! can someone point out the correct syntax for this: var myRel = $(this).attr("rel"); var largePath = $('a[rel*=' + myRel +']').attr("href"); Basicly the myRel gets set correctly, but how do i use the javascript variable as part of the jq