これは本当に簡単な質問かもしれませんが、画像内のrelタグの値を取得し、フォトギャラリースクリプトで使用する変数として保存したいと考えています。REL属性をJQueryの変数として使用する
ここは私が始めたものです。
var elem = $(this),
control = $('.slides_control',elem),
total = control.children().size(),
width = control.children().outerWidth(),
height = control.children().outerHeight(),
next = 0, prev = 0, number = 0, current = 0, loaded, active, clicked, position, direction;
backgroundColor = $(img[rel])
これは単にコードのsnippitしかし、私がやろうとしている画像の背景に一致するページ全体の背景色を保存するためのrelタグを使用しているです。
これは、relタグの値をキャプチャする正しい方法ですか?
ありがとうございました。