0

I have the following jquery snippe:

<snippet>
    <content><![CDATA[
/$("[data-increment-input-value='true']").click(function(e){
    e.preventDefault();
    var /$input = /$(this).siblings('input');
    /$input.val(parseInt(/$input.val())+1);
});

/$("[data-decrement-input-value='true']").click(function(e){
    e.preventDefault();
    var /$input = /$(this).siblings('input');
    /$input.val(parseInt(/$input.val())-1);
});
]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>jq-increment-decrement-input</tabTrigger>
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <scope>source.js</scope>
</snippet>

I have escaped all the doller signs , but i still cant selected the snippet when i am in my JS files . Why ? I mean it shows in the dropdown but then dissapers

3
  • Possible duplicate of Latex Sublime snippet Commented Jan 13, 2017 at 7:12
  • 1
    you need to use a backslash () to escape a $ in ST snippets, not a forward slash (/) Commented Jan 13, 2017 at 7:13
  • @KeithHall thanks aloot :) Commented Jan 13, 2017 at 7:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.