I'm looking for a way to include the jQuery javascript library in my project so I can use
[myWebView stringByEvaluatingJavaScriptFromString:a jquery command];
This doesn't work:
NSString *jQueryPath = [[NSBundle mainBundle]pathForResource:@"jquery-1.4.1" ofType:@"js"];
NSData *jQueryData = [[NSData alloc] initWithContentsOfFile:jQueryPath];
jQuery = [[NSMutableString alloc] initWithData:jQueryData encoding:NSUTF8StringEncoding];
NSString *javaScript = [jQuery stringByAppendingString:@"$('#ct100_mainContent_hypEmbGamerTag img').attr('src');"];
NSString *returnValue = [theWebView stringByEvaluatingJavaScriptFromString:javaScript];
I think it has something to do with the way Objective-C handles the / character.
Any suggestions?