[jQuery] How to get the float direction of an element?
Hi there, does anybody knows how to get the float direction of an element? If I do this: $(this).attr('style') I will get all the styles, but I just want to get right or left... Can anybody bring me some light?
Re: [jQuery] How to get the float direction of an element?
$(this).css('float') Thanks Regards, Dhruva Sagar. On Fri, Dec 18, 2009 at 3:21 PM, ximo wallas igguan...@yahoo.com wrote: Hi there, does anybody knows how to get the float direction of an element? If I do this: $(this).attr('style') I will get all the styles, but I just want to get right or left... Can anybody bring me some light?
[jQuery] Help with droppable
Hi there, I'm trying to create some words which can be dragged and dropped into a container (called droppable). I've tried to dynamically create some divs each containing a word, and they can be dragged okay, but when I try to drop, it isnt recognised. I notice that if I have a static div in the script it will be recognised by the droppable area (as per the example on the jquery site) thanks in advance, Alex - Heres the code I have so far: var these = [ 'red', 'blue', 'green', 'orange', 'white' ]; function makeButtons() { for (i in these) makeWord(these[i]); } function makeWord(s) { var e = $(document.createElement('div')); e.attr('id', s); // make a div with id orange / white / etc e.append(s); e.draggable( ); // make this div draggable $('body').append(e); } function initialise(){ makeButtons(); $(function(){ $(#droppable).droppable({ drop: function( ) { alert('dropped'); } }); }); } // html head script type=text/javascript $(document).ready( initialise ); /script /head body div id=droppable /div /body - -- rgds, Alex -
Re: [jQuery] AJAX and the Content-Type response header
i am afraid you have no way to parse the Content-Type in your javascript. because it the the header of the response, and you can only get the body (the content) of the response. actually, for a ajax to be able to work correctly, you MUST guarantee the request you send with ajax can get what you want, and you always know beforehand what the format (content type) it would be. for jquery, if you do not specify the content type parameter, it is smart enough to figure out what it is. On Fri, Dec 18, 2009 at 6:50 AM, MrM j...@merhar.si wrote: Hi, Firstly, let me apologize if this has been discussed before. I have searched the group and couldn't find anything on the subject. Now, to my question. Am I correct to assume that the jQuery.ajax function pays no heed to the Content-Type response header it receives from the server? If so, can I ask why? For instance, if the server sends 'application/json', it is fairly safe to assume that the response will be in JSON format and should therefore be eval'd. I have a situation where I do not know beforehand, what type of data the server will return, and therefore cannot specify a dataType parameter. In this case, I would like jQuery to parse the response, if it receives a 'Content-Type' header of 'application/json', and only then. If the header received is 'text/html', the response should not be parsed. Is there a reason why the 'Content-Type' response header is being ignored, when the dataType parameter is not specified? Or is this not the case and I am missing something? Thanks! -- Best Regards, David Shen http://twitter.com/davidshen84/ http://meme.yahoo.com/davidshen84/
[jQuery] Re: AJAX and the Content-Type response header
Thanks for your reply, David. i am afraid you have no way to parse the Content-Type in your javascript. because it the the header of the response, and you can only get the body (the content) of the response. This is not true. The XMLHttpRequest object has a getResponseHeader function, which you can call like this: xhr.getResponseHeader('Content- Type'). actually, for a ajax to be able to work correctly, you MUST guarantee the request you send with ajax can get what you want, and you always know beforehand what the format (content type) it would be. Not necessarily. After you receive the response, you can still check whether it is an object or a string (i.e. html). By doing so, you can then decide what to do with it. for jquery, if you do not specify the content type parameter, it is smart enough to figure out what it is. Could you please elaborate on this? When jquery figures out the content type of the response, what does it use that information for? As far as I can tell, it doesn't eval it, if the content type is 'application/json'. On Dec 18, 12:47 pm, Xi Shen davidshe...@googlemail.com wrote: i am afraid you have no way to parse the Content-Type in your javascript. because it the the header of the response, and you can only get the body (the content) of the response. actually, for a ajax to be able to work correctly, you MUST guarantee the request you send with ajax can get what you want, and you always know beforehand what the format (content type) it would be. for jquery, if you do not specify the content type parameter, it is smart enough to figure out what it is. On Fri, Dec 18, 2009 at 6:50 AM, MrM j...@merhar.si wrote: Hi, Firstly, let me apologize if this has been discussed before. I have searched the group and couldn't find anything on the subject. Now, to my question. Am I correct to assume that the jQuery.ajax function pays no heed to the Content-Type response header it receives from the server? If so, can I ask why? For instance, if the server sends 'application/json', it is fairly safe to assume that the response will be in JSON format and should therefore be eval'd. I have a situation where I do not know beforehand, what type of data the server will return, and therefore cannot specify a dataType parameter. In this case, I would like jQuery to parse the response, if it receives a 'Content-Type' header of 'application/json', and only then. If the header received is 'text/html', the response should not be parsed. Is there a reason why the 'Content-Type' response header is being ignored, when the dataType parameter is not specified? Or is this not the case and I am missing something? Thanks! -- Best Regards, David Shen http://twitter.com/davidshen84/http://meme.yahoo.com/davidshen84/
Re: [jQuery] Help with draggable / droppable
Worked ok for me: http://jsbin.com/anure source: http://jsbin.com/anure/edit If you need any more help, note that there's a separate list for jQuery UI: http://groups.google.com/group/jquery-ui - Richard On Thu, Dec 17, 2009 at 1:14 PM, Alex Beston alex.bes...@gmail.com wrote: Hi there, I'm trying to create some words which can be dragged and dropped into a container. I've tried to dynamically create some divs each containing a word, and they can be dragged okay, but when I try to drop, it isnt recognised. thanks in advance, Alex - Heres the code I have so far: var these = [ 'red', 'blue', 'green', 'orange', 'white' ]; function makeButtons() { for (i in these) makeWord(these[i]); } function makeWord(s) { var e = $(document.createElement('div')); e.attr('id', s); // make a div with id orange / white / etc e.append(s); e.draggable( ); // make this div draggable $('body').append(e); } function initialise(){ makeButtons(); $(function(){ $(#droppable).droppable({ drop: function( ) { alert('dropped'); } }); }); } // html head script type=text/javascript $(document).ready( initialise ); /script /head body div id=droppable /div /body -
[jQuery] creating frames
Hi, I need to create frames in the same page I'm by clicking a link. I tried this but I doesn't work, all remains blank: --- index.html --- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3.2/jquery.min.js/script titleTest/title script type=text/javascript language=javascript //![CDATA[ $(document).ready(function() { $(a).click(function() { $(body).replaceWith( 'frameset rows=17,* framespacing=0 '+ 'frame name=topframe src=http://www.google.it; marginwidth=0 marginheight=0 noresize scrolling=no frameborder=0'+ 'frame name= src=http://www.google.it; marginwidth=0 marginheight=0 scrolling=auto frameborder=0'+ '/frameset' ); return false; }); }); //]] /script /head body a href=#click/a /body /html When I click the link, all turns blank, the console reports no errors/ warnings. Shoud lI issue some command to force frame to load sources? O r some other command to issue a refresh for the browser?
Re: [jQuery] Help with droppable
Answered here http://groups.google.com/group/jquery-en/browse_thread/thread/6baa555a340b3ec4 - Richard On Fri, Dec 18, 2009 at 5:28 AM, Alex Beston alex.bes...@gmail.com wrote: Hi there, I'm trying to create some words which can be dragged and dropped into a container (called droppable). I've tried to dynamically create some divs each containing a word, and they can be dragged okay, but when I try to drop, it isnt recognised. I notice that if I have a static div in the script it will be recognised by the droppable area (as per the example on the jquery site) thanks in advance, Alex - Heres the code I have so far: var these = [ 'red', 'blue', 'green', 'orange', 'white' ]; function makeButtons() { for (i in these) makeWord(these[i]); } function makeWord(s) { var e = $(document.createElement('div')); e.attr('id', s); // make a div with id orange / white / etc e.append(s); e.draggable( ); // make this div draggable $('body').append(e); } function initialise(){ makeButtons(); $(function(){ $(#droppable).droppable({ drop: function( ) { alert('dropped'); } }); }); } // html head script type=text/javascript $(document).ready( initialise ); /script /head body div id=droppable /div /body - -- rgds, Alex -
[jQuery] Jquery Datepicker UI
Hi, I'm using the Datepicker that comes with the jQuery UI. I would like to keep some dates, in this calendar, checked. I'm bringing some dates in the format 12-31-2009 from my mySql, and i would like to put those dates in the datepicker, and show them selected. Do someone knows how to do this? or have an idea? if i didnt explained too well, i will be glad to try again. Thank you, Mauricio Vargas
[jQuery] Re: What is the event when a user presses the enter key anywhere on the page?
On a similar note, are the up and down arrows always the same keyCode?
[jQuery] Why doesn't this render the page correctly?
I am trying to dynamically change the colspan attribute on a group of cells using the code below: script type=text/javascript $(document).ready(function() { $('#plusSign').click(function(){ $('.ba_toggle').toggle(); if($('#plusSign').attr('src')=='../Images/ 1button_increase_colspan.gif') { $('#plusSign').attr('src','../Images/1button_decrease_colspan.gif'); $('td.ba_colspan').attr('colspan',2); } else { $('#plusSign').attr('src','../Images/1button_increase_colspan.gif'); $('td.ba_colspan').attr('colspan',4); } }); }); /script I added a bunch of alert tags to show me whether the attribute was being changed and it shows them as changed but the page renders incorrectly. The table on the screen does not change the colspan rendering. The $('.ba_toggle').toggle()) hides and shows the extra two columns correctly but the colspan does not adjust at all. What am I doing wrong?
[jQuery] Re: $.ajax POST on ff3.5 and Chrome
So, i've figured out why that happens: in case of ff and chrome that is just some security policy, which forbids to do post on remote host. Solution is quite simple - place controller and hmtl page with your scripts on same host, and after that parameter url in $.ajax post will transformed to url: /api?callback=?_=? instead of http://localhost:9090/api...
[jQuery] Traversing down
I would like to have Traverse Down and It self Traversing function in jQUery how can I make that as you all know we have Closest which is traversing up and includes it self... this is what I have $(event.target).find(' a:not(.active)'); the problem occurs when the event.target is the actual link . so any one has an idea an, thanks !!!
[jQuery] jQuery attaching actions to links with different class
Hi, I'm making a website for a garage. In the cars section I generate the cars list thru PHP. In the table there is a link to the details of the car. There is also a picture which can be clicked to go the details. So it would look something like this: td rowspan=3 width=13\a class=info6 href=#img src=../ website_patrick/images/6.jpg width=114 height=77 border=0 alt= //a/td td colspan=4 class=more_infoa class=info6 href=#more info/ a/td I've given a class to each of the links. The class name = info + car_id. Then I also have a div which has an id equal to the car_id and which is hidden. Now when you click either the picture or regular link the div should be displayed. How can i achieve this? Thanks in advance
[jQuery] Need help with image slideshow effect
I'm trying to do a simple image slideshow similar to what you see here: http://www.okadirect.com/ When the image changes, I want there to be that sort of flash effect that fades out to reveal the image. Looking around on the jquery website, I found this http://docs.jquery.com/UI/Effects/Highlight, which seems to be the effect I'm looking for, but I can't figure out how to implement it to my existing slideshow script (which I got from here: http://jonraasch.com/blog/a-simple-jquery-slideshow The slideshow script from that website uses a fade in transitioning effect between the images, which is nice and all, but I've really been spending hours trying to figure out how to implement that highlight/ flash effect into it. So, as you can clearly see, I have no javascript experience and any help would be really really appreciated. It seems like such a simple thing to do but I can't figure it out
[jQuery] Tab Switcher problem
Hi everyone, I am trying to get the demo no jquery, where the Tabs automatically switch without changing URL's. Here is the link to the demo I am trying to recreate. http://jqueryui.com/demos/tabs/ Here is the url to the page where I am trying to recreate the demo on http://www.mdplusclinic.com/test2.php I included all of dependent jquery library, source code, and CSS files for the demo, and I still cant get it to work! arrrg! I can find what I am doing wrong arrrg! Thanks Will-
[jQuery] jQuery in e107 plugin?
I have two e107 plug ins which are using jQuery. The first one uses jQuery UI too. The problem is that the second plug in re-defines the jQuery without the UI extension, and the first plug in is not able to work properly. Is there any way to load jQuery only if it has not been added yet? (I have tried typeof(jQuery) but it is throwing an error: jQuery is not defined.)
[jQuery] Lessons learned with sliding menus and lightbox
I just wrapped up a project and thought I'd share some solutions to problems I encountered since they seem to be fairly common. To give an overview, I was working on a landing page where I used lightbox to display samples of application screenshots as well as a menu in the right column that had collapsible and expandable content. The three things I set out to fix were: 1. A conflict in my .js files 2. Toggling a button graphic on click 3. Getting the first nav item in my menu to fade in and expand on load The files I used were: jquery-1.3.2.min.js (http://jquery.com) mootools.js (http://mootools.net) lightbox.js (http://www.huddletogether.com/projects/lightbox2/) Here are the solutions I came up with: 1. Conflicting FIles - After some reading I looked for things that may be called by both .js files. I noticed that 'hide' was used in both the jquery and mootools scripts. I changed all instances of 'hide' to 'hideit' in the jquery script as well as the inline code in my html file. Also the '$' function seemed to cause problems, so someone suggested using 'j$' for all instances of the '$' in my jQuery script and in my html page. 2. Toggling - A tricky thing I ran into was that my button didn't use an anchor tag for the action to expand and collapse but a div class called slide instead. In my ready function I added: // toggle slide button on click j$('.slide').click(function() { j$(this).toggleClass(slideDown); }); This changes the class from slide to slideDown. The slide class has a background image in my CSS with a down arrow and the slideDown class has... you guessed it, a background image with an up arrow graphic. 3. Getting the first nav menu item to expand and fade in on page load was more complex than I originally thought. After reading documentation on the jQuery site (http://docs.jquery.com) I found what I was looking for, the find expression. By finding the id for my navMenu I was able to get the desired effect. j$('#navMenu').find('div.view:first(0)').fadeIn('slow'); At first every menu item was opening but by using :first(0), I was able to ONLY target the first instance of 'view'. I assumed view:first would do the same thing, but by adding position (0) you get the specificity you need. I hope someone can learn from this and avoid the hours I spent looking for answers. I'm pretty new to jQuery and javascript so if something could be done easier or with best practices feel free to speak up. Also, if I refer to something incorrectly please let me know. Cheers, Erik Wallace
[jQuery] onclick and jquery in the Outlook browser
Hi folks, I'm having a dickens of a time with something that should be easy. When using $(body).append to place an anchor containing an onClick statement in the html body, the code is executed and the anchor is shown, but the onclick doesn't work. Strangely enough, if an anchor with an onClick is statically placed in the html code it works fine. This only happens when using the browser shown in Outlook; Chrome and IE8 have no problems. Here's the code I'm using... http://pastie.org/748407 Any help would be greatly appreciated. Gorfbox
[jQuery] Need help with image slideshow effect
I'm trying to do a simple image slideshow similar to what you see here: http://www.okadirect.com/ When the image changes, I want there to be that sort of flash effect that fades out to reveal the image. Looking around on the jquery website, I found this http://docs.jquery.com/UI/Effects/Highlight, which seems to be the effect I'm looking for, but I can't figure out how to implement it to my existing slideshow script (which I got from here: http://jonraasch.com/blog/a-simple-jquery-slideshow The slideshow script from that website uses a fade in transitioning effect between the images, which is nice and all, but I've really been spending hours trying to figure out how to implement that highlight/ flash effect into it. So, as you can clearly see, I have no javascript experience and any help would be really really appreciated. It seems like such a simple thing to do but I can't figure it out. My current script: JS function slideSwitch() { var $active = $('#slideshow IMG.active'); if ( $active.length == 0 ) $active = $('#slideshow IMG:last'); // use this to pull the images in the order they appear in the markup var $next = $active.next().length ? $active.next() : $('#slideshow IMG:first'); // uncomment the 3 lines below to pull the images in random order // var $sibs = $active.siblings(); // var rndNum = Math.floor(Math.random() * $sibs.length ); // var $next = $( $sibs[ rndNum ] ); $active.addClass('last-active'); $next.css({opacity: 0.0}) .addClass('active') .animate({opacity: 1.0}, 1000, function() { $active.removeClass('active last-active'); }); } $(function() { setInterval( slideSwitch(), 3000 ); }); CSS #slideshow { position:relative; height:350px; margin-left: 260px; } #slideshow IMG { position:absolute; border: 5px solid #B99E75; height: 400px; width: 500px; top:0; left:0; z-index:8; } #slideshow IMG.active { z-index:10; } #slideshow IMG.last-active { z-index:9; }
[jQuery] Re: Need help with image slideshow effect
Sorry for the double post, just forgot to add the code.
[jQuery] Re: Tab Switcher problem
both ui.base.css and ui.theme.css throw 404 not found... using a tool like Firebug (http://www.getfirebug.com) makes this a 2 second job to discover :-) On Dec 18, 9:32 am, William utopicstud...@gmail.com wrote: Hi everyone, I am trying to get the demo no jquery, where the Tabs automatically switch without changing URL's. Here is the link to the demo I am trying to recreate.http://jqueryui.com/demos/tabs/ Here is the url to the page where I am trying to recreate the demo onhttp://www.mdplusclinic.com/test2.php I included all of dependent jquery library, source code, and CSS files for the demo, and I still cant get it to work! arrrg! I can find what I am doing wrong arrrg! Thanks Will-
[jQuery] Make sub menu delay before disapper
Hi all! So I have this simple sub menu with Jquery. The problem is that the child menu is like 2px below the parent, so when the submenu appears I have to be very fast to mouseover it or else it will disapper. The sub menu is absolute positioned and I can't change that right now. So how can I make the sub menu, once activated, stay like 1 second before disappearing? Here's the code: (#community is the id of the li with a second level ul) $(#community).mouseover( function() { $(this).children(ul).css(display,block).animate({opacity: 1.0}, 3000); }).mouseout( function() { $(this).children(ul).animate({opacity: 1.0}, 3000).css (display,none); }); Note that I tried to use the animate for this but with no success. Any ideas? Please any help is appreciated.
[jQuery] Re: onclick and jquery in the Outlook browser
On Dec 18, 3:47 am, gorfbox gorf...@gmx.de wrote: I'm having a dickens of a time with something that should be easy. When using $(body).append to place an anchor containing an onClick statement in the html body, the code is executed and the anchor is shown, but the onclick doesn't work. Strangely enough, if an anchor with an onClick is statically placed in the html code it works fine. This only happens when using the browser shown in Outlook; Chrome and IE8 have no problems. Here's the code I'm using... http://pastie.org/748407 There's a long thread on the dev group [1] about the use of .attr(). I would suggest that you simply not try to use it to set event listeners. Instead, use .bind('click', fn) or the shortcut .click (fn). So instead of this: $(body).append($('a').attr({onClick:alert('dynamic test');return false}).text(Dynamic)) ; try something like this: $(body).append($('a').click(function(){alert('dynamic test');return false;}).text(Dynamic)); See this for an example: http://jsbin.com/eqiva (code http://jsbin.com/eqiva/edit) I don't know if this will fix your Outlook issue, but I think it sets you off in a better direction. Good luck, -- Scott [1] http://tinyurl.com/ydu7hsz
[jQuery] Re: Sliding menu elements from under the header
Noone knows anything? On 11 dec., 18:16, Bine Gorjanc gorj...@gmail.com wrote: So i want to make a menu which has links that (atleast seemingly) slide from under the header when hovering on their footer and retreat back up on mouseout. At first i though it was easy.. i defined menu element like this (approximately): div class=element div class=el_content Go home /div div class=el_footer /div /div with Jquery: $(document).ready(function(){ $(.element:not(.active) .el_content).hide(); $(.element:not(.active)).mouseenter(function() { $(this).children(.el_content).slideDown('fast'); }); $(.sitelink:not(.active)).mouseleave(function() { $(this).children(.el_content).slideUp(); }); }); The theory was that when the elements hide only their footer would be visible and would therefore be hanging from under the header since el_content div's height would be 0. However there is still space visible where el_content div would be visible. I also tried setting height explicitly to 0 but no effect. Thank you for any ideas
[jQuery] Re: How to edit a portion of text
The code isn't really semantic, which makes it difficult to get to the excerpt text. If you can't differentiate the excerpt from the content following by extra spans then there isn't a good way to catch your excerpt. I know, but sadly I have no control on it, it's just like WordPress put out the code. :/ Anyway, I found a good solution (for good, I mean better then no solution, of course) $('.hentry p:first').addClass('excerpt').find('span').replaceWith ('hook'); var portions = $('.hentry p:first').html(); var excerpt = portions.split('hook')[0]; var notexcerpt = portions.split('hook')[1]; $('.hentry p:first').html(strong+excerpt+/strong +notexcerpt); Then I styled the excerpt by css with a .excerpt strong selector. I am absolutely sure that jQuery/Javascript ninjas out there will surely able to refactor it. So, if someone would like to improve it, it would be really appreciate. I know it is a rough and crappy code, but, as said, better then nothing.
Re: [jQuery] Re: jquery.color.js no longer maintained?
Yep, that's the one! On Thu, Dec 17, 2009 at 8:43 PM, Dave Methvin dave.meth...@gmail.comwrote: To be sure, you're talking about this plugin? http://plugins.jquery.com/project/color The plugins site is due to get a redesign for the jQuery 1.4 in January and I think that will help some of the plugins that have been neglected. Maybe we can get some people to adopt the plugins that seem to be popular but orphaned. -- John Arrowwood John (at) Irie (dash) Inc (dot) com John (at) Arrowwood Photography (dot) com John (at) Hanlons Razor (dot) com -- http://arrowwood.blogspot.com Joan Crawfordhttp://www.brainyquote.com/quotes/authors/j/joan_crawford.html - I, Joan Crawford, I believe in the dollar. Everything I earn, I spend.
[jQuery] Re: validate - error messages keep piling up
Works now :) Had to create a special class that combined all three classes. On Dec 17, 5:36 pm, Mark Livingstone namematters...@msn.com wrote: OK, thanks. I will try and report back. On Dec 16, 12:22 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You have three classes specified for the errorClass. The plugin can't handle that. If you actually need more then one class, use the highlight and unhighlight options to add and remove those. Jörn On Wed, Dec 16, 2009 at 4:43 PM, Mark Livingstone namematters...@msn.comwrote: On Dec 16, 9:59 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: At least post your full JS codes instead of just excerpts. Jörn http://jsbin.com/isuco/edit I can e-mail you the link to my working page if that will help. Unfortunately I cannot share it here.
[jQuery] autocomplete: extra fields
I have a number of fields in a grid which are all using auto complete. I want the extraParams function to be able to work out which field I am in so that I can return a differently filtered list. I don't seem to have access to the input variable? Any clues? Thanks Simon
[jQuery] Validate Form - how to do NotEqualTo
I'm using Jörn Zaefferer's Jquery Form Validation which is great. However, I needed one extra method/function. I have some fields which initially have values (e.g. see below) input type=text name=First Name id=First Name value=Enter Name Here * / So for the validation if the Input First Name's value is equal to Enter Name Here*, this should then be marked as not true therefore displaying an error mssg and preventing form from being submitted. Any help would be much appreciated.
[jQuery] Re: onclick and jquery in the Outlook browser
Why not just use the .click() method of jQuery instead? Like this: $(document).ready(function(){ $(body).append($('a').click({alert('test');return false}).text (Dynamic)) ; }); On Dec 18, 12:47 am, gorfbox gorf...@gmx.de wrote: Hi folks, I'm having a dickens of a time with something that should be easy. When using $(body).append to place an anchor containing an onClick statement in the html body, the code is executed and the anchor is shown, but the onclick doesn't work. Strangely enough, if an anchor with an onClick is statically placed in the html code it works fine. This only happens when using the browser shown in Outlook; Chrome and IE8 have no problems. Here's the code I'm using... http://pastie.org/748407 Any help would be greatly appreciated. Gorfbox
[jQuery] Jquery using Modal Window with user input
What I am trying to do is the following: I have a webpage with some input fields, before the user can save the information to a database. I have the requirement to make the existing page dim and call up a modal window asking the user whey they made changes. This modal window would have a textbox to enter why the changes were made along with accept or cancel buttons. If the accept button is pressed the information in the textbox needs to get past back to the webpage so it can then write all changed information along with the reason why it was changed to the database. If cancel was pressed nothing would be done. Could someone please point me to an example that does something similar to this or please tell me if this requirement is feasible. Thanks in advance for your help. -- View this message in context: http://old.nabble.com/Jquery-using--Modal-Window-with-user-input-tp26852412s27240p26852412.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] Jquery using Modal Window with user input
You can use the jQuery UI Dialog with the modal option set to true. Here's an example: http://jqueryui.com/demos/dialog/#modal-form - Richard On Fri, Dec 18, 2009 at 10:12 PM, tinypond lawre...@tinypond.com wrote: What I am trying to do is the following: I have a webpage with some input fields, before the user can save the information to a database. I have the requirement to make the existing page dim and call up a modal window asking the user whey they made changes. This modal window would have a textbox to enter why the changes were made along with accept or cancel buttons. If the accept button is pressed the information in the textbox needs to get past back to the webpage so it can then write all changed information along with the reason why it was changed to the database. If cancel was pressed nothing would be done. Could someone please point me to an example that does something similar to this or please tell me if this requirement is feasible. Thanks in advance for your help. -- View this message in context: http://old.nabble.com/Jquery-using--Modal-Window-with-user-input-tp26852412s27240p26852412.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Traversing down
hey Guys I wrote the plugin pretty nice I have an example http://pedramtech.com/Development/jqueryPlugins/ $.fn.ClosestChildren = function(expr) { var $t = $(this); return $t.is(expr) ? $t : $t.find(expr).eq(0); }; jQuery(ul.u-first).bind(mouseover mouseout,function(event){ console.log(event.target); $(event.target).TraverseDown(ul); if(event.type == mouseout )$(event.target).TraverseDown (ul).removeClass(green); else $(event.target).TraverseDown(ul).addClass(green); }); this example finds the closest UL in the Ul.ui-first descendants and does some action with it , I used Event Delegation. On Dec 18, 10:39 am, Pedram pedram...@gmail.com wrote: I would like to have Traverse Down and It self Traversing function in jQUery how can I make that as you all know we have Closest which is traversing up and includes it self... this is what I have $(event.target).find(' a:not(.active)'); the problem occurs when the event.target is the actual link . so any one has an idea an, thanks !!!