In my application I have a form, which elements are named using a certain convention, i.e. they are paths, the parts of which are separated using the ~ sign.
Now I need to access one of them in jQuery by id, but I fail. Apparently, jQuery treats it as the #prev ~ sibling thing.
Is there a way I can sort of escape the ~ sign in the jQuery function?
Here is an example of what my code looks like:
<select id="a~b~c">
<option value='1'>one</opiton>
</select>
<script>
$("#a~b~c").change(function(){
alert('a');
});
</script>
try this