Unnamed: 0
int64 302
6.03M
| Id
int64 303
6.03M
| Title
stringlengths 12
149
| input
stringlengths 25
3.08k
| output
stringclasses 181
values | Tag_Number
stringclasses 181
values |
---|---|---|---|---|---|
1,920,430 | 1,920,431 | jQuery droppable not working | <p>I'm trying to implement what I thought was a simple droppable in jQuery. I need the draggable items to have a numeric id that changes. The items are draggable but when I drag them to the drop target the alert doesn't fire. My code is as follows:</p>
<pre><code> <script>
$(function() {
$( ".draggable" ).draggable();
$( ".trash" ).droppable({
accept: ".draggable",
drop: function( event, ui ) {
alert('dropped');
}
});
});
</script>
<div id="5" class="draggable"><p>Drag to target</p></div>
<div id="trash"><p>Drop here</p></div>
</code></pre>
| php jquery | [2, 5] |
2,583,973 | 2,583,974 | Jquery Incompatibility | <p>I have 2 test pages, <a href="http://www.northstardata.com/testing/index3.html" rel="nofollow">http://www.northstardata.com/testing/index3.html</a> and <a href="http://www.northstardata.com/testing/index4.html" rel="nofollow">http://www.northstardata.com/testing/index4.html</a>. Index3 works fine, index4 does not. They are the same with the exception that in index4.html, I have the js_extra.js commented out. This is a stripped down page and I need all the linked js items.</p>
<p>When I do load index4, and roll over the menu's in FF, I get "error in parsing value for 'background-position'. Declaration dropped. In IE it gives a javascript error and says invalid argument.</p>
<p>Can someone please tell me what the incompatibility is?</p>
| javascript jquery | [3, 5] |
2,549,132 | 2,549,133 | javascript doing nothing | <p>i am trying to make a finish time in a line of text update depending on the length of time selected in the drop down box relative to the start time.</p>
<p>so if the start time was 13:00 and the user selects 1 hour the finish time would update to 14:00</p>
<p>I dont have a clue what i am doing right or wrong since i dont know the first thing about javascript.</p>
<pre><code> <script type='text/javascript'>
function changeText(){
var option=document.getElementById('time').value;
if(option=='30'){
document.getElementById('field').value='".date(strtotime("$finishtime + 30 minutes"))."';
}
else if(option=='60'){
document.getElementById('field').value='".date(strtotime("$finishtime + 60 minutes"))."';
}
}
</script>
</code></pre>
<p>i dont seem to be getting any errors in the debugger and the script does nothing.</p>
<pre><code><a>Booking For ".$start." - </a><a id='field'>".$finishtime."</a><a> on ".$date."</a>
<form enctype='multipart/form-data' method='post'>
<a class='1'>Session Length</a>
<select name='time' id='time' onchange='changeText();'>
<option selected='selected'></option>
<option id='30' value='30'>30 mins</option>
<option id='60' value='60'>1 Hour</option>
</select>
</code></pre>
| php javascript | [2, 3] |
Subsets and Splits