Ajax Syntax Error Unrecognized Expression
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow
Syntax Error Unrecognized Expression Input Name=
the company Business Learn more about hiring developers or posting ads with us Stack syntax error unrecognized expression data-'times new roman'-abide Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of syntax error unrecognized expression # object htmldivelement 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up jQuery Ajax Get Data Syntax error, unrecognized expression: up vote 4 down vote favorite 1 Using the latest
Syntax Error Unrecognized Expression Href=
jQuery (1.9.0), I am confused as to why this code is not working: $.testAjaxFilter = function() { var base = this; // get faq categories var currentFaqCategories = $('#category-list ul li a'); // loop through each faq category link and bind a click event to each if ( typeof currentFaqCategories !== 'undefined') { $.each(currentFaqCategories, function(index, category) { $(category).click( function(e) { $(e.target).getFaqList(); return false; }); }); } // GET faq list elements from
Syntax Error Unrecognized Expression Unsupported Pseudo Hover
category link $.fn.getFaqList = function() { $.get($(this[0]).attr('href'), function(data) { base.addFaqSectionToPage( $(data).find('section.faq-page #content-column') ); }); }; // add new faq section to current page this.addFaqSectionToPage = function(faqSection) { // remove old faq section var currentFaqSection = $('section.faq-page #content-column'); currentFaqSection.empty(); currentFaqSection.append(faqSection); }; }; $.testAjaxFilter(); While viewing the console, upon clicking one of the category links, the GET retrieves the entire page in its response, but it is then followed by a Syntax error, unrecognized expression: (lists all HTML from retrieved page). So, something is going wrong in $.fn.getFaqList, possibly the use of $(data)? Is there anything obvious I am doing wrong? Any help would be greatly appreciated. I am not very savvy with AJAX stuff. javascript jquery ajax http-get share|improve this question edited Dec 24 '15 at 17:36 Brian Tompsett - 汤莱恩 3,078112675 asked Apr 18 '13 at 23:40 beefchimi 4902928 Do a .find('a') –karthikr Apr 18 '13 at 23:42 5 If you're on 1.8+ you can try $($.parseHTML(data)).find –Musa Apr 18 '13 at 23:52 Thanks Musa! That did it! I will add this to my question. –beefchimi Apr 19 '13 at 13:50 add a comment| 2 Answers 2 active oldest votes up vote 9 down vote accepted Thanks to Musa for pointing this out. I would reward you as the
here for a quick overview of the site Help Center Detailed answers to any syntax error unrecognized expression nth-child questions you might have Meta Discuss the workings and policies
Uncaught Error Syntax Error Unrecognized Expression
of this site About Us Learn more about Stack Overflow the company Business Learn more about error syntax error unrecognized expression angular hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack http://stackoverflow.com/questions/16094897/jquery-ajax-get-data-syntax-error-unrecognized-expression Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Ajax gives me this error Uncaught Error: Syntax error, unrecognized expression up vote 0 down vote favorite this is my ajax script and this is the error Uncaught Error: http://stackoverflow.com/questions/16045024/ajax-gives-me-this-error-uncaught-error-syntax-error-unrecognized-expression Syntax error, unrecognized expression the code works and removes the second drop down menu but doesn't append the updated 1 $(document).ready(function(){ $('#Channel_dropdown').change(function(){ var channel = $('#Channel_dropdown').val() alert(channel); $.ajax({ url: "/advanced_subchannel/", type: "GET", data: { 'ch_id' : channel, }, success:function(req){ $('#subChannel_dropdown').remove(); $(req).find('#advancedsearch_subchannels').each(function(i){ $('#advancedsearch_subchannels').append($(req).find('#subChannel_dropdown')); }); } }); }); }); jquery html ajax django share|improve this question edited Apr 16 '13 at 19:40 Daniele Armanasco 3,16973046 asked Apr 16 '13 at 19:03 user2287768 36 1. If you are using ie, remove the , after channel. 2. what does alert(req) return ? 3. Change $(req) in .append($(req).find to append($(this).find –karthikr Apr 16 '13 at 19:54 alert req returns this : –user2287768 Apr 16 '13 at 20:12 escape it within ``, or just edit the question and post it there. –karthikr Apr 16 '13 at 20:13
in the picture below. Send Cancel From : guestTo : Subject : Content : Type the characters you see in the picture below. Send Update CancelFeedbackEmail IDSubject : Comments : Send CancelPrivate MessageType the characters https://forum.jquery.com/topic/ajax-error-syntax-error-unrecognized-expression-object-object you see in the picture below. Type the characters you see in the picture below. Attach files Desktop Zoho Docs Google Docs Each Attachment size should not exceed 1.0 MB. Max no of attachments : 3Loading User Profile... guest Response titleThis is preview!Attachments Publish Back to edit Cancel ()Sign In New to this Portal? Click here to Sign upYou can also use the below options to syntax error loginLogin with FacebookLogin with GoogleLogin with Yahoo jQuery Plugins UI Meetups Forum Blog About Donate All Forums Recent Posts Log In Search jQuery Search jQuery Forum Move this topicForum : Getting StartedUsing jQueryUsing jQuery PluginsUsing jQuery UIDeveloping jQuery CoreDeveloping jQuery PluginsDeveloping jQuery UIQUnit and TestingAbout the jQuery ForumjQuery ConferencesjQuery MobileDeveloping jQuery Mobile Sub forum : Move this topic Cancel Using jQuery ruskinweb Ajax error "Syntax error, unrecognized syntax error unrecognized expression: #[object Object]" in Using jQuery • 3 years ago Hello,Whenever I make any kind of Ajax call in jQuery 1.8.3 or 1.9, I get stopped at:Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg );};with: "Syntax error, unrecognized expression: #[object Object]". My $.load call is below. I haven't been able to find any solutions online: maybe my GoogleFu isn't as good as I thought$(function () { $(".personPopupTrigger").hover( function () { var TheLink = $(this); var settings = $(this).attr('rel'); if (settings == '') return; $("#personPopupContainer").show() $('#personPopupContent').load('person.aspx?e='+ settings + ' .personPopupRe