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> &lt;script&gt; $(function() { $( ".draggable" ).draggable(); $( ".trash" ).droppable({ accept: ".draggable", drop: function( event, ui ) { alert('dropped'); } }); }); &lt;/script&gt; &lt;div id="5" class="draggable"&gt;&lt;p&gt;Drag to target&lt;/p&gt;&lt;/div&gt; &lt;div id="trash"&gt;&lt;p&gt;Drop here&lt;/p&gt;&lt;/div&gt; </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> &lt;script type='text/javascript'&gt; 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"))."'; } } &lt;/script&gt; </code></pre> <p>i dont seem to be getting any errors in the debugger and the script does nothing.</p> <pre><code>&lt;a&gt;Booking For ".$start." - &lt;/a&gt;&lt;a id='field'&gt;".$finishtime."&lt;/a&gt;&lt;a&gt; on ".$date."&lt;/a&gt; &lt;form enctype='multipart/form-data' method='post'&gt; &lt;a class='1'&gt;Session Length&lt;/a&gt; &lt;select name='time' id='time' onchange='changeText();'&gt; &lt;option selected='selected'&gt;&lt;/option&gt; &lt;option id='30' value='30'&gt;30 mins&lt;/option&gt; &lt;option id='60' value='60'&gt;1 Hour&lt;/option&gt; &lt;/select&gt; </code></pre>
php javascript
[2, 3]