http://www.asual.com/jquery/address/から Address プラグインを使用しようとしていますが、クリックされたリンクまたはオブジェクトにアクセスして $.address.change 関数をトリガーできるようにする必要があります。
基本的に、次のようなリンクがあります。
<a href="#" class="active" rel="address:/show-my-activity">Activity</a>
そして、次のような $.address.change 関数があります。
<script language="javascript">
$.address.internalChange(function (e) {
// this is where I need to get the obj of what was clicked to trigger it
// find out what the e.value is, and do the ajax needed
});
</script>
「e」のすべてのプロパティを既にループしましたが、クリックされたオブジェクトを参照するものが見つかりません。「e」変数から返されるものは次のとおりです...
undefinedtype value :change
timeStamp value :1317227369056
jQuery1317227368799 value :true
value value :/show-my-activity
path value :/show-my-activity
pathNames value :show-my-activity
parameterNames value :
parameters value :[object Object]
queryString value :
result value :undefined
target value :[object Object]
currentTarget value :[object Object]
handler value :function (e) {
var str;
var obj = e;
for (prop in obj) {
str += prop + " value :" + obj[prop] + "\n";
}
alert(str);
if (e.value === "/showMyActivity") {
}
}
data value :undefined
handleObj value :[object Object]
preventDefault value :function () {
this.isDefaultPrevented = Z;
var a = this.originalEvent;
if (a) {
a.preventDefault && a.preventDefault();
a.returnValue = false;
}
}
stopPropagation value :function () {
this.isPropagationStopped = Z;
var a = this.originalEvent;
if (a) {
a.stopPropagation && a.stopPropagation();
a.cancelBubble = true;
}
}
stopImmediatePropagation value :function () {
this.isImmediatePropagationStopped = Z;
this.stopPropagation();
}
isDefaultPrevented value :function Y() {
return false;
}
isPropagationStopped value :function Y() {
return false;
}
isImmediatePropagationStopped value :function Y() {
return false;
}
どんな助けでも大歓迎です。