[jQuery] Re: New jQuery Editable released.
< and > sign is not escaped properly... if you type it doesn't show up after closing editable mode.. On 18 Jan., 17:45, "a.karimzadeh" wrote: > You can check it here:http://plugins.jquery.com/project/Editable > > It's fully customizable: > > #1 Easy to use > $('div.editable').editable(); > #2 Submission can be set on any Event > $('div.editable').editable({submitBy:'change'}); > #3 Can use onSubmit and onEdit to define your own behavior. > $('div.editable').editable(type:'select',options:{'a':'Item 1', > 'b':'Item 2'},submit:'save',cancel:'cancel',onSubmit:endFunction); > #4 Currently it convert tags to textbox, password, textarea, drop-down > list. you can extend it by extending $.editFactory to support more > tags. > > Check this website to find out > more:http://arashkarimzadeh.com/index.php/jquery/7-editable-jquery-plugin > > Find how to extend > it:http://arashkarimzadeh.com/index.php/jquery/9-how-to-extend-jquery-ed...
[jQuery] bind eventhandler after animation finished
hi everyone, what i want to accomplish in general: i have a text field which has a filename as the value. when hovering the field, a div should slide in from the bottom of the field and show a preview of this image. currently i'm using the following jquery-code: function rexShowMediaPreview() { var value; if($(this).hasClass("rex-widget-media")) value = $("input[type=text]", this).val(); else value = $("select", this).val(); var div = $(".rex-media-preview", this); var url = '../index.php?rex_resize=246a__'+ value; if(value && value.length != 0 && ( value.substr(-3) == "png" || value.substr(-3) == "gif" || value.substr(-3) == "bmp" || value.substr(-3) == "jpg" || value.substr(-4) == "jpeg") ) { div.html(''); div.slideDown("slow"); } else { div.slideUp("slow"); } }; $(".rex-widget-media.rex-widget-preview, .rex-widget-medialist.rex- widget-preview") .bind("mouseenter", rexShowMediaPreview) .bind("mouseleave", function() { var div = $(".rex-media-preview", this); div.slideUp("slow"); }); the markup looks like the following: this doesn't work well... (when leaving the div while sliding in, the div immediatly slides out...) is someony able to give me a hint...? i suppose it would be much better if the mouseleave eventhandler would be bound when the slide in animation finished (while unbinding the mouseenter handler) and the same while sliding out vice versa... any ideas?
[jQuery] Re: bind eventhandler after animation finished
hi stephan, ahh ok, thx for pointing to the callbacks... soo if i can't solve the problem this way how to handle it? thank you, markus On 24 Jan., 14:32, Stephan Veigl wrote: > First of all, slideUp(speed, callback) and slideDown(speed, callback) > have callback functions which are called once the animation is > finished. (seehttp://docs.jquery.com/Effects/slideDown#speedcallback > -> examples) > > But I'm not sure if this really solves your problem. If you bind the > mouseleave event in the callback you might never get this event when > the user moves the mouse out of your div before the animation has > finished. > So the main question is: what would you like to happen if the mouse is > moved out while the image is sliding in? > > by(e) > Stephan > > 2009/1/24 maggus.st...@googlemail.com : > > > > > hi everyone, > > > what i want to accomplish in general: > > i have a text field which has a filename as the value. > > when hovering the field, a div should slide in from the bottom of the > > field and show a preview of this image. > > currently i'm using the following jquery-code: > > > function rexShowMediaPreview() { > > var value; > > if($(this).hasClass("rex-widget-media")) > > value = $("input[type=text]", this).val(); > > else > > value = $("select", this).val(); > > > var div = $(".rex-media-preview", this); > > var url = '../index.php?rex_resize=246a__'+ value; > > if(value && value.length != 0 && > > ( > > value.substr(-3) == "png" || > > value.substr(-3) == "gif" || > > value.substr(-3) == "bmp" || > > value.substr(-3) == "jpg" || > > value.substr(-4) == "jpeg") > > ) > > { > > div.html(''); > > div.slideDown("slow"); > > } > > else > > { > > div.slideUp("slow"); > > } > > }; > > > $(".rex-widget-media.rex-widget-preview, .rex-widget-medialist.rex- > > widget-preview") > > .bind("mouseenter", rexShowMediaPreview) > > .bind("mouseleave", function() { > > var div = $(".rex-media-preview", this); > > div.slideUp("slow"); > > }); > > > the markup looks like the following: > > > > > > > > > > value="myimg.jpg" id="REX_MEDIA_2" readonly="readonly" /> > > > > > > > > > > > this doesn't work well... > > (when leaving the div while sliding in, the div immediatly slides > > out...) > > > is someony able to give me a hint...? i suppose it would be much > > better if the mouseleave eventhandler would be bound when the slide in > > animation finished (while unbinding the mouseenter handler) and the > > same while sliding out vice versa... > > > any ideas?
[jQuery] Re: what would be the opposite of top.frames as a jquery selector context?
maybe the parent of your documentElement? On 27 Jan., 21:36, jquertil wrote: > If i want to do something in a parent frame, I would do this: > > $('#myDiv', top.document).hide(); > > but what about this following scenario? I'm inside a frame that was > created like so: > > $('body', top.document).append(''); > > inside myiframe, I now want to know the id of my iframe, because I > would not know it. > > All I am able to "see" in the DOM is the topmost document. > > I could traverse through all the iframes and get their ID's but that's > useless because I wouldn't know which of them is the one I'm currently > in. > > I suppose I'm simply trying to pass a variable to a child frame so it > becomes available on the frame's document.onload().