jQuery UI Widgets Forums Layouts Splitter Uncaught Error: Invalid jQuery Selector

This topic contains 19 replies, has 7 voices, and was last updated by  larabrian 5 years, 1 month ago.

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
  • Uncaught Error: Invalid jQuery Selector #32787

    jqwidgetsdev
    Participant

    Hello.

    After upgrading to v 3.0.4 I am getting the following error:

    Uncaught Error: Invalid jQuery Selector – #centre-Splitter! Please, check whether the used ID or CSS Class name is correct.
    jqxcore.js:7

    Checking my code the is the only reference to centre-Splitter

    $(‘#centre-Splitter’).jqxSplitter({
    width: ‘100%’,
    height: ‘100%’,
    orientation: ‘vertical’,
    panels: [
    { size: ‘50%’, collapsible: false },
    { size: ‘50%’, collapsible: true }
    ]
    });

    Reviewing the properties used and the jqxSplitter API I am not seeing what is causing the problem.

    Thanks.

    Uncaught Error: Invalid jQuery Selector #32831

    Peter Stoev
    Keymaster

    Hi jqwidgetsdev,

    That exception is called when you try to create a widget, set a property, invoke a method from an Invalid jQuery Selection i.e when the element that you try to select does not exist in the DOM or there is some typo somewhere in the jQuery Selection code.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Uncaught Error: Invalid jQuery Selector #32835

    jqwidgetsdev
    Participant

    Hello Peter.

    I am upgrading from 3.0.2. I am struggling to find out which changes has been applied between that and 3.0.4 – specifically to the Invalid jQuery Selector errors I am seeing now. The errors do not appear when using version 3.0.2.

    Release history on http://www.jqwidgets.com/jquery-widgets-documentation/documentation/releasehistory/releasehistory.htm does not give me any leads. Did version 3.0.4 get a whole lot stricter, in which area(s)?

    What is wrong with the following?

    $(‘#centre-Splitter’).jqxSplitter({
    width: ‘100%’,
    height: ‘100%’,
    orientation: ‘vertical’,
    panels: [
    { size: ‘50%’, collapsible: false },
    { size: ‘50%’, collapsible: true }
    ]
    });

    var contextMenu = $(‘#jqxMenu’).jqxMenu({ width: ‘120px’, height: ‘140px’, theme: theme, autoOpenPopup: false, mode: ‘popup’ });

    $(‘#jqxLbFocus’).jqxListBox({ source: srclbFocus, width: ‘100%’, height: ’80px’, theme: theme });

    Thanks in advance.

    Uncaught Error: Invalid jQuery Selector #32844

    Peter Stoev
    Keymaster

    Hi jqwidgetsdev,

    Invalid jQuery Selector would be raised when you have Invalid jQuery Selection. That means that you may try to create a widget, set its property or call a method from Invalid jQuery selection. Check for typos in your code and check your jQuery selections. In the previous versions that would result in “nothing” i.e a widget would not be created or a property would not be set.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Uncaught Error: Invalid jQuery Selector #32866

    jqwidgetsdev
    Participant

    Thanks Peter. Yes, this clarifies a lot.

    I noticed that I had some code to create the respective jQWidget, like above in this thread, but it was not being referred to elsewhere.
    It seems unlikely to me but for that case, is “Uncaught Error: Invalid jQuery Selector” also thrown? Else I am afraid I am lost, as to what is wrong with the code.

    In that case, which other checks can you suggest I perform to get to the bottom of this?

    Thanks.

    Uncaught Error: Invalid jQuery Selector #46111

    Siva
    Participant

    Hi peter,
    Same issue am facing “Uncaught Error: Invalid jQuery Selector – #jp-panel! Please, check whether the used ID or CSS Class name is correct”.

    From your above conversation i can able to understand this issue, but can you suggest us get out from this error?

    Uncaught Error: Invalid jQuery Selector #46113

    Siva
    Participant

    Peter, can i do like this?
    If its a “ID or Classname” no such HTML Element in the DOM means, can i use .remove() or .empty() function by using jquery?

    Please suggest

    Uncaught Error: Invalid jQuery Selector #46114

    Peter Stoev
    Keymaster

    Hi Siva,

    The problem is that in your code you may be try to select with jQuery a HTML Element which does not exist on your web page. Our Framework finds out that there’s invalid jQuery selection and throws an Error to point your attention to fix it in your code. My suggestion is to check your code for invalid jQuery Selection by ID or CSS Class.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Uncaught Error: Invalid jQuery Selector #46116

    Siva
    Participant

    Thanks peter,

    when we are using jqwidget2.9.3, our code and design will working fine. Now we are upgrade to jqwidget3.0.4, here only we are facing these error.

    1) “Uncaught Error: Invalid jQuery Selector – #jp-panel! Please, check whether the used ID or CSS Class name is correct”
    2) Our whole UI design alignment collapse

    NOTE: Not possible to check our whole code.

    Uncaught Error: Invalid jQuery Selector #46138

    Peter Stoev
    Keymaster

    Hi Siva,

    1. “Uncaught Error: Invalid jQuery Selector – #jp-panel! means that there is no ID or CSS Class – jp-panel in the Web Page’s DOM when you try to select it with jQuery. I am sorry to understand that you do not wish to resolve that issue on your side and you would like to continue using incorrect jQuery selector.
    2. Updating to a newer version requires updating all CSS files, too as there could be some layout changes in the CSS styles.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Uncaught Error: Invalid jQuery Selector #46193

    Siva
    Participant

    Hi peter,

    I got a solution for this error, anyway thanks for your inputs.

    1) “Uncaught Error: Invalid jQuery Selector – #jp-panel! means that there is no ID or CSS Class” – Only two option to recover from this error:
    a) if(!$(“#jp-panel”)) { //Do our coding }
    OR
    b) if($(“#jp-panel”).length != 0) { //Do our coding }

    Uncaught Error: Invalid jQuery Selector #46212

    Peter Stoev
    Keymaster

    Hi Siva,

    May be the best option would be to just check your HTML markup for HTML Element with ID/Class “jp-panel” or if you add it dynamically, check when you add it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Uncaught Error: Invalid jQuery Selector #47903

    paries
    Participant

    I am having the exact error
    Works find in previous version and now does not
    has anyone figure out what has broke (Peter please do not respond with that generic check your html . I can read and it worked before!)
    It appears to be something with dynamic loading of the grid. I am using it in a large single page app.

    Uncaught Error: Invalid jQuery Selector #47904

    paries
    Participant

    Hi Siva,where did you end up putting those checks in your coding to make it work (in the doc ready section?)

    Thanks
    Randy

    Uncaught Error: Invalid jQuery Selector #47905

    paries
    Participant

    i found that if i put <div id=”jqxgrid”></div> in the div that is going to get injected and replaced with new html that included the grid fixed the problem. Seems like it needs it when the jqxgrid script loads. This kind of fixed the problem, now other functionally does not work. The cells are created but the labels are not being displayed. So this little hack may not be the answer

Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic.