Click here to Skip to main content
15,877,915 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: Java Script moveing a picture around the screen Pin
enhzflep31-May-12 10:38
enhzflep31-May-12 10:38 
GeneralRe: Java Script moveing a picture around the screen Pin
Ali Al Omairi(Abu AlHassan)1-Jun-12 1:15
professionalAli Al Omairi(Abu AlHassan)1-Jun-12 1:15 
AnswerRe: Java Script moveing a picture around the screen Pin
enhzflep29-May-12 10:41
enhzflep29-May-12 10:41 
QuestionHow to change mouse cursor in jQuery UI resizable plugin? Pin
Tesic Goran25-May-12 0:06
professionalTesic Goran25-May-12 0:06 
AnswerRe: How to change mouse cursor in jQuery UI resizable plugin? Pin
Ali Al Omairi(Abu AlHassan)29-May-12 5:08
professionalAli Al Omairi(Abu AlHassan)29-May-12 5:08 
QuestionA Unique Problem - Ignoring Placing Page on Back Button History Pin
OrangeV24-May-12 5:40
OrangeV24-May-12 5:40 
AnswerRe: A Unique Problem - Ignoring Placing Page on Back Button History Pin
Sandeep Mewara24-May-12 9:02
mveSandeep Mewara24-May-12 9:02 
QuestionHow to make the text box draggable using jQuery? Pin
Tesic Goran23-May-12 8:45
professionalTesic Goran23-May-12 8:45 
Is anybody there who has experience with making html input text box draggable using jQuery?

I've tried to wrap text box inside div and can make it resizable, but not draggable. The div and text box are placed on standard jQuery UI dialog. Actually, I need both - draggable and resizable html input text box inside dialog.

The code is as follows:

JavaScript
$(document).ready(function() {
    $("#btnShow").click(function(e) {
        $('#dialog').dialog("open");
    });
    $('#dialog').dialog({
        title: "Sample dialog",
        resizable: false,
        autoOpen: false,
        width: 400,
        height: 300,
        buttons: [{ text: "OK", click: function() { /* do something */ } },
            { text: "Cancel", click: function() { $(this).dialog("close") } }]
    });
    $('#divText1').draggable({
        containment: "parent",
        cursor: "move"
    }).resizable({
        containment: "parent",
        handles: "e, w"
    });
});


HTML
<input id="btnShow" type="button" value="Show" />

<div id="dialog" title="Dialog Box" style="border: solid 1px black; margin: 0px 0px 0px 0px; padding: 5px 0px 0px 5x;">
    <div id="divText1" style="width: 200px; height: 30px;">
        <input type="text" style="width: 98%;" value="Hello world!" /><br /><br />
    </div>
</div>


Thank you in advance.

Goran
AnswerRe: How to make the text box draggable using jQuery? Pin
Vitaly Tomilov24-May-12 16:13
Vitaly Tomilov24-May-12 16:13 
AnswerRe: How to make the text box draggable using jQuery? Pin
ZurdoDev25-May-12 8:47
professionalZurdoDev25-May-12 8:47 
Questionfinding a substring match at the beginng of a of another string. Pin
Steve Holdorf22-May-12 7:16
Steve Holdorf22-May-12 7:16 
AnswerRe: finding a substring match at the beginng of a of another string. Pin
Vitaly Tomilov22-May-12 8:51
Vitaly Tomilov22-May-12 8:51 
AnswerRe: finding a substring match at the beginng of a of another string. Pin
scottgp22-May-12 9:25
professionalscottgp22-May-12 9:25 
QuestionSimple autocomplete textbox control problem Pin
Steve Holdorf20-May-12 11:10
Steve Holdorf20-May-12 11:10 
AnswerRe: Simple autocomplete textbox control problem Pin
Vitaly Tomilov20-May-12 11:27
Vitaly Tomilov20-May-12 11:27 
QuestionHow to read Doc or Pdf file using javascript or jquery Pin
priya014319-May-12 2:03
priya014319-May-12 2:03 
AnswerRe: How to read Doc or Pdf file using javascript or jquery Pin
frostcox19-May-12 21:24
frostcox19-May-12 21:24 
QuestionJquery quering the db Pin
frostcox18-May-12 8:20
frostcox18-May-12 8:20 
AnswerRe: Jquery quering the db Pin
Vitaly Tomilov20-May-12 11:31
Vitaly Tomilov20-May-12 11:31 
GeneralRe: Jquery quering the db Pin
frostcox21-May-12 6:00
frostcox21-May-12 6:00 
GeneralRe: Jquery quering the db Pin
BobJanova21-May-12 6:42
BobJanova21-May-12 6:42 
GeneralRe: Jquery quering the db Pin
Vitaly Tomilov21-May-12 8:33
Vitaly Tomilov21-May-12 8:33 
QuestionHow to get td background value? Pin
elelont218-May-12 7:43
elelont218-May-12 7:43 
AnswerRe: How to get td background value? Pin
ZurdoDev25-May-12 8:51
professionalZurdoDev25-May-12 8:51 
QuestionSend XML data from a Windows Gadget Pin
Scolpit16-May-12 6:09
Scolpit16-May-12 6:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.