← Back to Scripts
jQuery Scripts
Small jQuery snippets and examples for DOM manipulation.
Uploaded jQuery snippets
ID: jq1
Added: 2025-12-17 19:44:40.331000
Disable Copy, Cut, and Paste for Open-Ended Survey Questions
This script prevents respondents from using copy, cut, and paste actions in text input and textarea fields within the survey. It ensures that responses are manually typed, helping improve data quality and reducing the risk of pasted or duplicated answers. The code runs after the page loads and blocks these actions using JavaScript event handling.
<style label="disablePasting" mode="after" name="respview.client.js"><![CDATA[
<script>
$ (document).ready(function(){
$ ('input[type=text],textarea').bind("cut copy paste",function(e) {
e.preventDefault();
});
});
</script>
]]></style>
ID: jq2
Added: 2026-01-22 16:41:00.298000
iOS Dropdown Long Text Display Fix
Use this code when dropdown options contain long text that appears hidden or clipped on iOS devices.
<script>
$ (function() {
var isIOS = "${gv.request.device.properties['isiOS']}"==1;
isIOS && $ (".input.dropdown").append("<optgroup label=''></optgroup>");
});
</script>