[eluser]jblack199[/eluser]
So I figured out how to do the drag drop with jquery. The real way to do what I want to do is with the sortable plugin for jquery.
I would first have my CSS
Code:
#leftColumn {
border:1px solid #ccc;
float:left;
margin-right:5%;
padding:5px;
width:40%;
}
#rightColumn {
border:1px solid #ccc;
float:right;
padding:5px;
width:40%;
}
ul {
min-height:50px;
/*IE doesn't understand min-height, but this will fix that*/
height:auto !important;
height:50px;
}
li {
cursor:move;
}
I would then do my JS code
Code:
$(document).ready({
$("#listB").sortable({
connectWith: ['#listA'],
receive: function(event, ui) {
//Run this code whenever an item is dragged and dropped into this list
var itemText= ui.item.text();
alert(itemText + " just joined this list");
},
remove: function(event, ui){
//Run this code whenever an item is dragged and dropped out of this list
var itemText= ui.item.text();
alert(itemText + " just left this list");
}
});
});
and viola it works... Now downside to this, is it is supposed to NOT work in IE7 or before. That could be a problem if anyone who gets their hands on my software still uses IE7 as a primary browser.
Next trick on that part, is going to figure out how to not check the text per-say, but to check the ID number that goes along with that text. either way, that should be a good way to handle creation of my main header navigation as well as my sub-navigation (if any) allowing for a pretty good effect in the end for user control...
Question 2 is still outstanding though, that one I dont know enough about CI to figure out.