Yup I was wrong, I've found the function now which deals with it and
it looks like a simple string comparison. I can do some php but I've
not had time to learn javascript yet! One someone please guide me to
do the stuff described above please?
So, the function is...
navigationFilter: function() {
return this.href.toLowerCase() ==
location.href.toLowerCase();
}
I would like to change that to also return true when the entirety
location.href matches precisely with this.href in any part
(preferrably just the beginning but eaither would work in my case). So
I've split it up a little like...
navigationFilter: function() {
if( this.href.toLowerCase() ==
location.href.toLowerCase() ) {
return true;
} else if (#NEW EXPRESSION#) {
return true;
} else return false;
}
Now, if php, I could just use a strstr like
strstr( this.href.toLowerCase(), location.href.toLowerCase() ) but
I've tried that and it doesn't work. Can anyone tell me the jscript/
jquery method of doing a STRSTR please?
Much appreciated.
>
> function findActive(headers, selector) {
> return selector != undefined
> ? typeof selector == "number"
> ? headers.filter(":eq(" + selector + ")")
> : headers.not(headers.not(selector))
> : selector === false
> ? $([])
> : headers.filter(":eq(0)");
> }
>
> If anyone can help, I'd appreciate it a lot.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---