I was wondering how I make this actually work, without the ternary operator it works perfectly fine. Is it even possible to use a ternary operator in this type of situation?

$("#link").html("website" + $("#search").val() + "" + t.games.check==true ? "?games=true" : "?games=false");

Also I will need to do multiple ternary operators in this one statement if that changes anything.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.