I have the following code:
String jquery = "$(h4:contains('im looking for this')).get(0)";
WebElement element = (WebElement)((JavascriptExecutor) wd).executeScript(jquery);
WebDriverException: Unexpected token ':'. Expected ')' to end a argument list.
You're missing quotes around the whole selector:
String jquery = "$(\"h4:contains('im looking for this')\").get(0)";