I’ve got such a frustrating question for which I’m convinced there is an easy answer. Unfortunately I can’t seem to find it anywhere! I have a table which I have no control over (SharePoint) and the table ID which has been allocated contains curly brackets:
e.g. <table id="{ACDC3234-D009-4889-931A-FCC069613AB6}-{EF2BF0FD-7927-4194-910F-0FE83EC4F118}"></table>
How can I select the table using JQuery whilst maintaining the brackets?
The code as it stands is:
$(function(){
$('/{#{ACAC3258-D068-4799-931A-FCC069613AB6}-{EF2BF0FD-7927-4194-910F-0FE83EC4F118}}/').visualize({type: 'bar', width: '420px'});
});
I am trying to use JQuery Graphing Tool, Visualise.
Any help on this would be really greatly appreciated!
Many Thanks!
The simplest option is to call
$(document.getElementById("{ACDC3234-D009-4889-931A-FCC069613AB6}-{EF2BF0FD-7927-4194-910F-0FE83EC4F118}")).You can also try escaping the braces with
\characters (which must themselves be escaped in the JS string literal):