I think you needed to do more than that to make it work in 2.7x. You must have also included the masking function in the template somewhere.
In 3.x, I would think you need to:
1) Extend an existing theme
2) Upload the masking function file to
/upload/themes/survey/yourNewThemeName/scripts/
3) Include it in
/upload/themes/survey/yourNewThemeName/config.xml like this:
Code:
<files>
<css>
<add>css/ajaxify.css</add>
<add>css/theme.css</add>
<add>css/custom.css</add>
</css>
<js>
<add>scripts/theme.js</add>
<add>scripts/ajaxify.js</add>
<add>scripts/myMaskingScript.js</add>
</js>
<print_css>
<add>css/print_theme.css</add>
</print_css>
</files>
4) Insert something like this in the source of the question text:
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function($) {
$('#question{QID} input[type="text"]').mask("999-99-9999",{ placeholder:"#" });
});
</script>
More about the new template system in LS3.x here -
www.limesurvey.org/manual/New_Template_System_in_LS3.x