shortysbest Posted March 23, 2011 Share Posted March 23, 2011 ///Hide Search Suggestions if (!$(event.target).hasClass('search')&&!$(event.target).hasClass('search-suggestions')) { $(".search-suggestions").hide(); } This works perfectly in firefox, but it doesn't in safari. Quote Link to comment Share on other sites More sharing options...
Adam Posted March 28, 2011 Share Posted March 28, 2011 There's nothing within that code Safari doesn't support... Perhaps it's a problem else-where on the page? Do you have this online so we could take a look? Quote Link to comment Share on other sites More sharing options...
shortysbest Posted March 28, 2011 Author Share Posted March 28, 2011 Well actually it's an odd problem, there is multiple problems with jquery in Safari, only on localhost though, when I put the files onto my webserver they work fine. I'm not sure what the issue could be for this, not a huge ordeal though as I use Firefox for my primary localhost browser to build with. Quote Link to comment Share on other sites More sharing options...
Adam Posted March 28, 2011 Share Posted March 28, 2011 That is odd.. Does this particular snippet work from your remote sever? Quote Link to comment Share on other sites More sharing options...
shortysbest Posted March 28, 2011 Author Share Posted March 28, 2011 Actually that example above didn't work in safari, well not entirely, however I made a new working script that was better and does work in all major browsers. Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 28, 2011 Share Posted March 28, 2011 Actually that example above didn't work in safari, well not entirely, however I made a new working script that was better and does work in all major browsers. share it! to help others Quote Link to comment Share on other sites More sharing options...
shortysbest Posted March 28, 2011 Author Share Posted March 28, 2011 $(document).click(function(event) { ////Hide Notifications if($(event.target).parents("div:first").attr("class")=="notifications-container"||$(event.target).parents("div:first").attr("class")=="quick-box"||$(event.target).attr("class")=="notifications") {}else { $(".notifications-container").hide(); } }); This is what I replaced it with which works good. Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 28, 2011 Share Posted March 28, 2011 thanks for sharing! Quote Link to comment Share on other sites More sharing options...
Adam Posted March 28, 2011 Share Posted March 28, 2011 I think you could do this a better way. What's the HTML structure that you're trying to work with? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.