I have a code that generates text depending on variables in the url. What I want to know is if there a method to get two variables that are located separately from each other in the same string of the url at the same time to show my text.
Say this is my string ?q1=iphone3gs&q2=Other&q3=fixme
. The url must contain iphone
and other
in order for the text to show.
iphone
and other
must be selected to show text http://jsfiddle.net/2tXvh/6/show/?q1=iphone3gs&q2=Other&q3=fixme (this is only calling on q2=Other
)
I was think along the lines of using (/iphone&Other/)
shown below but that will not work.
if (keys[1].match(/iphone&Other/)) {
$("#linkdiv1").append(nextLink1);
}