[jQuery] Changing droppable accept or scope dynamically in the drag callback.

2009-05-09 Thread Mark Lacas
I've tried about everything and can't get the results I need. Basically I have some draggables in a movable div (pane). When I'm over the pane I only want the draggable to be droppable on elements in the pane (and have a visual cue as such). When I move beyond the pane I only want the

[jQuery] How to destroy a tooltip?

2009-05-08 Thread Mark Lacas
I'm using tooltips on a file list. When I delete a file (and it's DOM structure representation) that has a tooltip I'm getting an error at line 232. setting(current) is undefined if (event) { 231 // position the helper 15 pixel to bottom right, starting from mouse position 232 left =

[jQuery] Jquery seems to be sending two requests the first few times. . .

2009-02-09 Thread Mark Lacas
I have been tracing this one down for two days. Has anyone else ever seen jquery making multiple request for a single call? Here is the call: $(#configure_blocks).load( config_templates/+config_template +.html, { bust: new Date() }, function( data ){

[jQuery] Re: Trying to set the id of a 2nd level div and failing

2008-01-16 Thread Mark Lacas
immediate children which won't get you your second level divs in a single call from the #obj level, no matter what selector you use. eg... var obj = $(#obj); obj.find(.obj_level1.obj_level2).attr( id, Bob ); On Jan 15, 6:03 am, Mark Lacas [EMAIL PROTECTED] wrote: I'm trying to set the id

[jQuery] Trying to set the id of a 2nd level div and failing

2008-01-15 Thread Mark Lacas
I'm trying to set the id of a 2nd level obj selected by class and it doesn't seem to work as I thought it would. Unfortunately all of the level one objects get the id assignment, not the level two object. Here it is before I do the operation: div id=obj div class=obj_level1 div

[jQuery] Click through on stacked elements

2007-11-30 Thread Mark Lacas
I'm struggling to figure out a way to click through a series of stacked elements until I find one with my custom click handler. Is there an easy way to do this? For example I have a image of a US map and I want to put a clickable image behind it. When I click on the place where the image is

[jQuery] Re: Jquery Ajax dropping special characters

2007-11-27 Thread Mark Lacas
Why not escape the data with javascript's escape function? It fixes all the illegal characters. ml

[jQuery] Re: Bug in jQuery selector or am I just not understanding?

2007-11-26 Thread Mark Lacas
All those divs are necessary for the type of system I'm building. Can't talk about it yet, but when we release I can explain why. Solved the problem by using the in between my selectors. I adore jQuery and love becoming smarter about jQuery every day from this list. Amazing resource. ml

[jQuery] Bug in jQuery selector or am I just not understanding?

2007-11-25 Thread Mark Lacas
Why does the code below show the values for the two alerts to be: bilbo and layout_1 ? I would have expected: bilbo and bilbo. I thought the cascading selectors would have chosen the dp_properties class that is the first child level of the selected div. . .not the dp_properties class buried two

[jQuery] Re: .css() doesn't seem to work when I add the transitional DTD to my index page?

2007-11-22 Thread Mark Lacas
Nevermind, The browser just doesn't let bad syntax work. Note, I left off the px extension on posx and posy and that was what was making it fail. Now back to your regularly scheduled program. ml On Nov 21, 10:14 am, Mark Lacas [EMAIL PROTECTED] wrote: I'm having a weird problem. . . When

[jQuery] .css() doesn't seem to work when I add the transitional DTD to my index page?

2007-11-21 Thread Mark Lacas
I'm having a weird problem. . . When I add: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; to the top of my index page, the css calls from the code snippet below stop working. //

[jQuery] Re: Accordion or jQuery broken if the accordion data is loaded dynamically

2007-11-19 Thread Mark Lacas
Got it! Turns out unaccordion() is your friend when finished with an accordion group. Most pages won't need this because a reload of the page fixes things. Dynamic loading of accordion blocks does need to unaccordion() when finished with the accordioned data. If you don't call

[jQuery] Re: Accordion or jQuery broken if the accordion data is loaded dynamically

2007-11-19 Thread Mark Lacas
Got it! Turns out unaccordion() is your friend when finished with an accordion group. Most pages won't need this because a reload of the page fixes things. Dynamic loading of accordion blocks does need to unaccordion() when finished with the accordioned data. If you don't call

[jQuery] Accordion or jQuery broken if the accordion data is loaded dynamically

2007-11-17 Thread Mark Lacas
Trying this again to see if anyone has any clues. I have been doing some dynamic things with accordion and have found some areas that don't work. After some rather extensive debugging it appears that the problem lies in jQuery. I'm doing some very dynamics things with the content that lives

[jQuery] Re: Nested getJSON

2007-11-12 Thread Mark Lacas
. Can anyone enlighten me on this? On Nov 11, 10:07 am, herbasher [EMAIL PROTECTED] wrote: Pretty, pretty. What's your problem? What are you working on? Herb On Nov 10, 3:45 pm, Mark Lacas [EMAIL PROTECTED] wrote: Here is my code: $.getJSON(/cgi-bin/messages.cgi, { id: last_message

[jQuery] Is getJSON reentrant? Can I nest them?

2007-11-10 Thread Mark Lacas
It appears that I can't nest getJSON calls. When I make the second call, the throbber in Firebug spins forever. I'm getting a list of changes from a database and then trying to get more precise data on each change with a second getJSON call in an anonymous function in the first getJSON call.

[jQuery] Nested getJSON

2007-11-10 Thread Mark Lacas
Here is my code: $.getJSON(/cgi-bin/messages.cgi, { id: last_message }, function( json ) { $.each( json.messages, function( i, item ){ if ( item.command == new ) { $.getJSON(/cgi-bin/get_data.cgi, { id: item.id, fields: all }, function( json ) {

[jQuery] Re: Problems with Accordion seems to be with jQuere itself

2007-11-06 Thread Mark Lacas
It works in FF the first time. Did you close it and try it a second time? That's when it breaks for me. ml On Nov 5, 5:05 am, Dan G. Switzer, II [EMAIL PROTECTED] wrote: Mark, I have been doing some dynamic things with accordion and have found some areas that don't work. After some

[jQuery] Problems with Accordion seems to be with jQuere itself

2007-11-05 Thread Mark Lacas
I have been doing some dynamic things with accordion and have found some areas that don't work. After some rather extensive debugging it appears that the problem lies in jQuery. I'm doing some very dynamics things with the content that lives in the accordion. The problems I've found seem to

[jQuery] Re: Syntax for bind using a string from a variable for the callback functions name

2007-10-17 Thread Mark Lacas
Got it, here is how I did it. Works great! Thanks all. ml $( .object ).each( function() { var element = this; var dblclick_func = $( #+element.id + .dp_properties).attr(dp_dblclick_func); if ( typeof( dblclick_func ) != undefined ) {

[jQuery] Re: How to dynamically load javascript from a database instead of using getscript?

2007-10-17 Thread Mark Lacas
Got it. My answer to my own questiong and other's responses. I'm using a perl cgi to access the database and it turns out I didn't even have to use eval. I just insert the script chunk with the inspector code from that database. $(#+dp_id + .dp_inspector_code).append( safescript( 'script

[jQuery] How to dynamically load javascript from a database instead of using getscript?

2007-10-16 Thread Mark Lacas
I have looked high and low and can only find references for dynmically loading javascript using ajax from a file. I have chunks of javascript that I want to keep in MySQL and load them on demand. They are simple chunks of text that end up in a variable. I need to inject the text from that

[jQuery] Syntax for bind using a string from a variable for the callback functions name

2007-10-16 Thread Mark Lacas
Hello, I'm stuck on a silly detail. I want to bind a click to a function whose name is a simple string in a variable from a database I've tried a number of different syntactical combinations but none seem to work. Here is my code: $( .object ).each( function() { var element = this;

[jQuery] $(#id).get() vs getElementByID()

2007-10-04 Thread Mark Lacas
Hello, This works when calling an external javascript library: var doodad = document.getElementById(plasma); Drag.init( doodad ); And this doesn't: var doodad = $(#plasma).get(); Drag.init( doodad ); They both return [object HTMLDivElement] Am I missing something? Thanks, ml