[jQuery] Re: Edit-In-Place with Form plugin
On Apr 11, 2008, at 3:05 AM, Chris wrote: My problem is that I cannot edit in place the items submitted with the form plugin without refreshing the page. http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F -- Mika Tuupola http://www.appelsiini.net/
[jQuery] Re: How to get a 'fresh' ui datepicker date?
The above code has some error. Here is my final solution: write another plugin to get the date. HTML: div id=dateRange Plan Date: input type=text id=eventFromDate/ to input type=text id=eventToDate/ br/ Actual Date: input type=text id=actualFromDate/ to input type=text id=actualToDate/ /div JS: $(#dateRange input).datepickerRange({showOn:'button'}); /* Update datepicker if found and return the date */ $.fn.getInputDate = function(){ var elem = this[0]; if(elem){ var inst = $.datepicker._getInst(elem._calId); if(inst){ inst._setDateFromField(elem); return inst._getDate(); } } return null; } /* Assume from/to date have same ID prefix options can provide suffix options's beforeShow is overriden */ $.fn.datepickerRange = function(options){ options = options || {}; var fromSuffix = options.fromSuffix || FromDate; var toSuffix = options.toSuffix || ToDate; options.beforeShow = function(input){ var isFrom = (new RegExp(fromSuffix+$)).test(input.id); var prefix = input.id.replace(new RegExp((+fromSuffix+|+toSuffix +)$),); return { minDate: isFrom? null: $(#+prefix+fromSuffix).getInputDate(), maxDate: !isFrom? null: $(#+prefix+toSuffix).getInputDate() }; } return this.datepicker(options); } On 4月11日, 上午3時14分, Jacky See [EMAIL PROTECTED] wrote: I have found some wicked way to do it. This is the code where I'm writing a plugin to accept date range pair and auto-init them. //Assuming from/to date have same prefix id (e.g. #eventFromDate, #eventToDate) $.fn.datepickerPair = function(options){ return this.datepicker( $.extend({ beforeShow:function(elem){ var id = elem.id; var isFrom = /FromDate$/.test(id); var prefix = id.replace(/(FromDate|ToDate)$/,''); var minDate = isFrom?null: $.datepicker._getInst($ (#+prefix+FromDate).get(0)._calId)._setDateFromField(#+prefix +FromDate); var maxDate = !isFrom?null: $.datepicker._getInst($ (#+prefix+ToDate).get(0)._calId)._setDateFromField(#+prefix +ToDate); return {minDate:minDate, maxDate:maxDate}; },options) ); } Any other 'cleaner' way? On 4月11日, 上午1時09分, Jacky See [EMAIL PROTECTED] wrote: Dear all, This is about the ui datepicker. I have an input field with a datepicker, using image as trigger. The field is not read only, user are allowed to input by keyboard. The problem is that when user type some invalid input like '33' the $('#input').datepicker('getdate'), will still only get the last selected date. Is that any way to get the 'fresh' date? Any trigger I can call? I need it to fill in a date range using 'beforeShow' option.
[jQuery] Re: Problems with JQuery Cycle Plugin and IE6
Hi, I'm relatively new to using JQuery so maybe making a newbie error bt can't see where. I've installed the JQuery Cycle Plugin on the homepage of a website I've built and it works perfectly in Firefox, Safari, and IE7 but it crashes IE6. I have used this plugin before and it worked perfectly in all browsers and I can't see that I've done anything different. The line that is causing the crash is: codescript type=text/javascript$('#s1').cycle('fade');/script/ code When I comment this line out IE6 loads the page. I can't find any documentation on a bug in this plugin so I'm at a loss. This is the page that crashes: http://www.admgroup.entadsl.com/bg_bags/index.php and this is the website for the plugin I'm using: http://www.malsup.com/jquery/cycle/ If anyone can help??? Kirsty Looks like you copied my example page, but you've got some extra cruft in there. This is how I drive my demo pages: script type=text/javascript $(function() { // run the code in the markup! $('code').each(function() { eval($(this).text()); }); }); /script ... precode$('#s1').cycle('fade');/code/pre but I only code it that way to ensure that my examples are accurate. And in your case you have an extra script tag that is unneeded: codescript type=text/javascript$('#s1').cycle('fade');/script/code But really you should change all that code and write it the easy way. All you need is the following: script type=text/javascript $(function() { $('#s1').cycle(); }); /script
[jQuery] learning jquery
what is the best way to learn jquery? quickly and easliy
[jQuery] ajax with ifmodified - handling of null in last modified
In my current application I was working with jquery ajax api with ifmodified enabled. This was working great for me and I was using 304s to my heart's content. In a particular case, the server side application was returning a Http code 200 but was not setting the Last- Modified header. Because of this, in firefox I found that jquery instead of taking it as a 200 as it is, it was treating it as a 304 and returning an error code of notmodified. The returned XMLHttpRequest was ignored. When I debugged using firebug, I found that the problem. The method httpNotModified in jQuery does the following: 1 httpNotModified: function( xml, url ) { 2 try { 3 var xmlRes = xml.getResponseHeader(Last-Modified); 4 5 // Firefox always returns 200. check Last-Modified date 6 return xml.status == 304 || xmlRes == jQuery.lastModified[url] || 7 jQuery.browser.safari xml.status == undefined; 8 } catch(e){} 9 return false; 10 } In line 3, the method is retrieving the Last-Modified header. Since the server has not set it, the value is coming out as null. In line 6, there is a comparison between xmlRes (value is null) and jQuery.lastModified (value is undefined), and this comparison turns out to be equal. This causes jQuery to decide that the status of the call is notmodified and hence it returns a notmodified error and ignores the server response. I tried adding a null check inside this method (and converting the null to an empty string) and then everything works fine. This is something we might want to do within the jquery library itself. Please let me know your thoughts. Thanks, nacnez
[jQuery] some $.index() prob
Hello guys, recently I faced problem with index function, example in documentation works perfectly but it's slightly simple. When I try to use this function in more complexed way it's not working, here's what I'm trying to: $(#organize ul).mousedown( function(e){ if($(e.target).is(img)){ var $li = $(e.target).parent(); var $index = $(#id ul.tabs li).index($li); $(#id ul).tabs(close, $index); } }); this piece of code is for the tab close image situated in li element. console.log always show that $index is -1. I've tried a lot of different ways to get index of li, but all of them failed. Now the question - maybe my understanding of this function isn't right and it can be done in different way? All what I need is index of li element that's hold img in it to pass it to close method of tabs. Thanks.
[jQuery] Re: this ?
$(.highlight).removeClass; The selector $('.highlight') is choosing all your objects that have the class 'highligh'. removeClass still needs to know what class to remove (ie, the method removeClass doesn't know how or why you selected those particular elements). It takes the class name as an argument, so to remove 'highlight' from everything that has the class 'highlight' you do this: $('.highlight').removeCalss('highlight'); $(this:even).addClass(shaded); Note that 'this' is within quotation marks, so you're not actually using the 'this' keyword. What $('this:even') means is: Find every even object of type 'this'. Of course, in html there is no 'this' element. To use it correctly, you'd use it like this: $(this) - note there are no quotes. Think of it as referring to the 'subject' of a particular function. Eg, in the following piece of code: $('#someDiv).click(function(){ $(this).hide(); }); $(this) refers to the the object that was clicked. Eg2, in the following code: $('h1').each(function(){ $(this).css('color': 'red'); }); $(this) refers to the particular 'h1' element that is being iterated over. Using ':even' narrows a selection of objects to only even ones. You don't use it with 'this' (it doesn't really mean anything in that context), but, for example you can do: $('div:even').hide(); This would hide every second div element. Hope this helps. Hamish On Apr 11, 2:23 pm, Jeff [EMAIL PROTECTED] wrote: 'scuse me for the noob question here... i have statements like this: $(.highlight).removeClass; $(this:even).addClass(shaded); And I don't think I'm using this or :even correctly; it doesn't work =) Googling has turned up some different ways that the this keyword is used, and I'm not sure what is right here. I'm just trying to remove a class from a bunch of elements and then apply a new class to even numbered elements. Any ideas? Again, sorry for the dumb question, but googling the word this isn't very helpful since you get like 10 kabillion results.
[jQuery] Passing variables between two function
Hi all, I've a newbie question about variable scope...essentially i've two anonimous function and i need to retrieve a variable generated into first function and use it in the second one. Here the basic code to get an idea of what i'm trying... var pointX ; $(.nav_slider).mousemove(function(e){ pointX = e.pageX ; // do some other stuff with pointX ... }); $(document).scroll(function () { var docH = $(window).height(); var docW = $(window).width(); docWcenter = docW / 2; //here i need again pointX ... $(#point).css( 'position', 'relative' ).animate({ left :docWcenter + pointX + px}, 200 ); }); How i can retrieve it?
[jQuery] Problems with JQuery Cycle Plugin and IE6
Hi, I'm relatively new to using JQuery so maybe making a newbie error bt can't see where. I've installed the JQuery Cycle Plugin on the homepage of a website I've built and it works perfectly in Firefox, Safari, and IE7 but it crashes IE6. I have used this plugin before and it worked perfectly in all browsers and I can't see that I've done anything different. The line that is causing the crash is: codescript type=text/javascript$('#s1').cycle('fade');/script/ code When I comment this line out IE6 loads the page. I can't find any documentation on a bug in this plugin so I'm at a loss. This is the page that crashes: http://www.admgroup.entadsl.com/bg_bags/index.php and this is the website for the plugin I'm using: http://www.malsup.com/jquery/cycle/ If anyone can help??? Kirsty
[jQuery] IE6 removing /li : bug?
Hi there I have noticed a very weird bug when using $.html() in IE6. For example I have: div id=content pparagraph/p ul lilist item 1/li lilist item 2/li lilist item 3/li /ul /div When I used $(#content).html() I get pparagraph/p ul lilist item 1 lilist item 2 lilist item 3 /ul Other other browser is fine, problem is with IE6. Any suggestions?
[jQuery] Passing variables between two function
Hi all, I've a newbie question about variable scope...essentially i've two anonimous function and i need to retrieve a variable generated into first function and use it in the second one. Here the basic code to get an idea of what i'm trying... var pointX ; $(.nav_slider).mousemove(function(e){ pointX = e.pageX ; // do some other stuff with pointX ... }); $(document).scroll(function () { var docH = $(window).height(); var docW = $(window).width(); docWcenter = docW / 2; //here i need again pointX ... $(#point).css( 'position', 'relative' ).animate({ left :docWcenter + pointX + px}, 200 ); }); How i can retrieve it?
[jQuery] Re: triggering clueTip with inline javascript
Anyone have any thoughts on this? thanks! az On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote: Hello, As I discussed in a previous post (unresponsive script error on long page with many clueTips) I'm trying to trigger clueTips with a javascript function instead of binding the clueTips on page load. Each link calls theclueTipfunction and passes its unique link id. Here is the function: functionclueTip( id ){ var linkid = '#' + id; // bind then click $(linkid).cluetip().click(); } It mostly works on Firefox, except that the waitImage is acting strangely. Sometimes it doesn't show up at all. And sometimes it shows up but in the location of the previously clickedclueTip! But the actualclueTipalways shows up in the right place. On IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any ideas? Is my approach fundamentally flawed or am I missing something small? thanks! az
[jQuery] How to use jFrame Plug-In
Hi, Trying to get the jFrame plug-in to work but unsure how to use it. (see: http://plugins.jquery.com/project/jframe) I have set-up the follow div, i.e: div id=content src=#/div and then make a call to: jQuery(#content).loadJFrame(returnURL); Have also included all necessary js libraries. The div loads successfully but I get a javascript error: Line: 200364044 Char: 3 Error: Object doesn't support this property or method Can someone please let me know what I have missed and please correct/ show me the correct usage of this plug-in. What does the callback parameter need to be? Thanks. Tony.
[jQuery] Re: this ?
Awesome! Thanks! On Apr 10, 10:50 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote: You could do this: $('.highlight').removeClass('highlight').filter(':even').addClass('shaded'); The this keyword is useful only inside javascript code (it won't work in a selector). JK -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Sent: Thursday, April 10, 2008 7:24 PM To: jQuery (English) Subject: [jQuery] this ? 'scuse me for the noob question here... i have statements like this: $(.highlight).removeClass; $(this:even).addClass(shaded); And I don't think I'm using this or :even correctly; it doesn't work =) Googling has turned up some different ways that the this keyword is used, and I'm not sure what is right here. I'm just trying to remove a class from a bunch of elements and then apply a new class to even numbered elements. Any ideas? Again, sorry for the dumb question, but googling the word this isn't very helpful since you get like 10 kabillion results.- Hide quoted text - - Show quoted text -
[jQuery] Immediate validation
Hello jQuery Team:) Sorry for banal question, but I have not found answet to it in the web. So, I have simple html form and I want to validate it using jQuery validation plugin. Everything is fine? but I want to change validation event. In documentaion it is said that, By default, forms are validated on submit, triggered by the user clicking the submit button or pressing enter when a form input is focused (option onsubmit). In addition, once a field was highlighted as being invalid, it is validated whenever the user types something in the field (option onkeyup). When the user enters something invalid into a valid field, it is also validated when the field loses focus (option onblur). Can I change it to make validation immediate, for example onchange event + on submit? I was trying to configure jQuery like this : $j(document).ready(function(){ $j(#bookForm).validate({ defaults: { immediate: true }, event: 'change', onsubmit: true, rules: { title: { required: true, maxLength: c:out value='${BOOK_TITLE_MAXSIZE}' / }, but it doesnt works for me. Please, advise Thanks, Taras
[jQuery] jQuery plugin: Tooltip problem with disabled form fields
Hi, Shameful to admit but my first post is a request for help but here goes. I've been using the wonderful jQuery plugin: Tooltip from bassistance.de but I haven't been able to get it working for disabled form input fields. I don't know whether this is an issue with HTML in general not being able to display the title attribute or with the plugin itself. I've tried to specifically select the disabled inputs to no avail with: $('#form_style input[disabled]').tooltip(); Any help would be greatly appreciated. James
[jQuery] Passing variables between two functions
Hi all, I've a newbie question about variable scope...essentially i've two anonimous function and i need to retrieve a variable generated into first function and use it in the second one. Here the basic code to get an idea of what i'm trying... var pointX ; $(.nav_slider).mousemove(function(e){ pointX = e.pageX ; // do some other stuff with pointX ... }); $(document).scroll(function () { var docH = $(window).height(); var docW = $(window).width(); docWcenter = docW / 2; //here i need again pointX ... $(#point).css( 'position', 'relative' ).animate({ left :docWcenter + pointX + px}, 200 ); });
[jQuery] Re: this ?
$(this+':even').addClass(shaded); Jeff [EMAIL PROTECTED] wrote: 'scuse me for the noob question here... i have statements like this: $(.highlight).removeClass; $(this:even).addClass(shaded); And I don't think I'm using this or :even correctly; it doesn't work =) Googling has turned up some different ways that the this keyword is used, and I'm not sure what is right here. I'm just trying to remove a class from a bunch of elements and then apply a new class to even numbered elements. Any ideas? Again, sorry for the dumb question, but googling the word this isn't very helpful since you get like 10 kabillion results. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[jQuery] Re: Passing variables between two function
Declare the variable in the same scope as each of those functions is declared. For example: $(function() { var pointX; $(.nav_slider).mousemove(function(e) { ... // set pointX here ... }); $(document).scroll(function() { ...// use pointX here... }); }); - Richard Richard D. Worth http://rdworth.org/ On Fri, Apr 11, 2008 at 4:33 AM, Decagrog [EMAIL PROTECTED] wrote: Hi all, I've a newbie question about variable scope...essentially i've two anonimous function and i need to retrieve a variable generated into first function and use it in the second one. Here the basic code to get an idea of what i'm trying... var pointX ; $(.nav_slider).mousemove(function(e){ pointX = e.pageX ; // do some other stuff with pointX ... }); $(document).scroll(function () { var docH = $(window).height(); var docW = $(window).width(); docWcenter = docW / 2; //here i need again pointX ... $(#point).css( 'position', 'relative' ).animate({ left :docWcenter + pointX + px}, 200 ); }); How i can retrieve it?
[jQuery] Re: some $.index() prob
try this: $li.parent().index($li) The index method needs to be called on the container element (in this case, the ul), while passing the child element. - Richard Richard D. Worth http://rdworth.org/ On Fri, Apr 11, 2008 at 4:48 AM, hex0id [EMAIL PROTECTED] wrote: Hello guys, recently I faced problem with index function, example in documentation works perfectly but it's slightly simple. When I try to use this function in more complexed way it's not working, here's what I'm trying to: $(#organize ul).mousedown( function(e){ if($(e.target).is(img)){ var $li = $(e.target).parent(); var $index = $(#id ul.tabs li).index($li); $(#id ul).tabs(close, $index); } }); this piece of code is for the tab close image situated in li element. console.log always show that $index is -1. I've tried a lot of different ways to get index of li, but all of them failed. Now the question - maybe my understanding of this function isn't right and it can be done in different way? All what I need is index of li element that's hold img in it to pass it to close method of tabs. Thanks.
[jQuery] weird jQuery bug, but solved
Hi, I am building an HTA (using IE6) that is using jQuery to write some html to a div. The html contains a script tag with content. What (as I understand by reading through the minified code) jQuery does, is filter the script tag, create one, add it to the head and remove it right after. That *should* work very well, but for some reason in an HTA this very last step fails: head.removeChild(script); I have no clue why this is, but I checked it like this: alert(script.parentNode == head); which returns false. Solution: script.parentNode.removeChild(script);. Since this doesn't affect the correct behaviour in regular HTML pages, I propose this change for future versions. Cheers, Paul
[jQuery] Re: Cycle plugin, start from last entry in container, rather than first
Ahh...Very nice Mike. Now if I start on slide 5, and hit the previous button, will that display slide 4, then slide 3 ,etc.? -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Alsup Sent: Thursday, April 10, 2008 5:08 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Cycle plugin, start from last entry in container, rather than first Does anyone know if this is possible? div id=cycle pmsg 5/p pmsg 4/p pmsg 3/p pmsg 2/p pmsg 1/p /div Assuming that I have the above code, is it possible to force msg 1 to be displayed rather than msg 5? Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] Do you mean to have the show start on slide 5? Use the 'startingSlide' option. http://www.malsup.com/jquery/cycle/start.html Mike
[jQuery] Re: Cycle plugin, start from last entry in container, rather than first
That did it Mike. I like you...you've got the answers to all of my questions, AND you already put in all of the features I request into Cycle. So is this some sort of space/time warp? If I request a feature, will it already have been in there before I even thought of it? Or is the very act of my typing it out, force it to appear retroactively in EVERY person's copy? :) Have a great Friday! andy -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Alsup Sent: Thursday, April 10, 2008 5:08 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Cycle plugin, start from last entry in container, rather than first Does anyone know if this is possible? div id=cycle pmsg 5/p pmsg 4/p pmsg 3/p pmsg 2/p pmsg 1/p /div Assuming that I have the above code, is it possible to force msg 1 to be displayed rather than msg 5? Andy Matthews Senior ColdFusion Developer Office: 615.627.9747 Fax: 615.467.6249 www.dealerskins.com Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at [EMAIL PROTECTED] Do you mean to have the show start on slide 5? Use the 'startingSlide' option. http://www.malsup.com/jquery/cycle/start.html Mike
[jQuery] Re: Cycle plugin, start from last entry in container, rather than first
That did it Mike. I like you...you've got the answers to all of my questions, AND you already put in all of the features I request into Cycle. So is this some sort of space/time warp? If I request a feature, will it already have been in there before I even thought of it? Or is the very act of my typing it out, force it to appear retroactively in EVERY person's copy? You're just predictable, Andy. ;-)
[jQuery] Re: blockUI. To have a cancel button appeared after n seconds if the blockUI not unblocked
Nobody have this requirement? Cound anyone show me some light on how to deal with an uncloseable blockUI window please? On Apr 7, 1:40 pm, Jiming [EMAIL PROTECTED] wrote: Dear sir, From time to time, we might have code which usingblockUIthat cannot unblock-ed properly. In that case, user can do nothing but refresh the whole page and which is not what we expected at all. I suggest the following options 1. cancel_dealy: which will appear a close button, such as an element within theblockuidiv and have class .blockui_close. When click it, unblock will be called. 2. cancelCallback: an call back function ifcancelclicked 3. successCallback: an call back function ifblockuicalled instead of canceled Thanks! Jiming
[jQuery] redefining a function bound to document.ready
I want to redefine a function that is being bound to document.ready by someone else. Actually, I'd prefer just to unbind the function, but the initial binding is in a file that I don't want to change, and uses this syntax: $(theFunction); I understand from http://dev.jquery.com/ticket/1311#comment:3 that this syntax is not supported for the 'unbind from document.ready' functionality that was added in 1.2.2. But I'm wondering if there is a way around this, for instance, to redefine the function using something like: window['theFunction'] = function () { // my definition... }; But this doesn't seem to work -- the other definition of theFunction gets executed in any case. Is there any way to achieve what I am trying to do without changing the other file?
[jQuery] Re: Problems with JQuery Cycle Plugin and IE6
Hi Mike, Thanks for replying. This is what I've done I deleted: codescript type=text/javascript$('#s1').cycle('fade');/script/ code and put this in head script type=text/javascript $(function() { $('#s1').cycle();}); /script However, now the page doesn't even load before IE6 crashes. It all works in IE7 and Firefox but not IE6. Thanks for your help Kirsty On Apr 11, 12:00 pm, Mike Alsup [EMAIL PROTECTED] wrote: Hi, I'm relatively new to using JQuery so maybe making a newbie error bt can't see where. I've installed the JQuery Cycle Plugin on the homepage of a website I've built and it works perfectly in Firefox, Safari, and IE7 but it crashes IE6. I have used this plugin before and it worked perfectly in all browsers and I can't see that I've done anything different. The line that is causing the crash is: codescript type=text/javascript$('#s1').cycle('fade');/script/ code When I comment this line out IE6 loads the page. I can't find any documentation on a bug in this plugin so I'm at a loss. This is the page that crashes: http://www.admgroup.entadsl.com/bg_bags/index.php and this is the website for the plugin I'm using: http://www.malsup.com/jquery/cycle/ If anyone can help??? Kirsty Looks like you copied my example page, but you've got some extra cruft in there. This is how I drive my demo pages: script type=text/javascript $(function() { // run the code in the markup! $('code').each(function() { eval($(this).text()); });}); /script ... precode$('#s1').cycle('fade');/code/pre but I only code it that way to ensure that my examples are accurate. And in your case you have an extra script tag that is unneeded: codescript type=text/javascript$('#s1').cycle('fade');/script/code But really you should change all that code and write it the easy way. All you need is the following: script type=text/javascript $(function() { $('#s1').cycle();}); /script- Hide quoted text - - Show quoted text -
[jQuery] Re: Validate plugin 1.2.1 backward compatibility break
Hi Jörn, I've put together some simplified example pages showing the two main use cases I'm having a problem with. I created two versions of each page, one using Validate 1.1.2, and one using Validate 1.2.1. The 1.1.2 example function properly, while the 1.2.1 versions don't. Validating a subsection of a larger form: http://www.gearheadsoftware.com/subsect-112.html http://www.gearheadsoftware.com/subsect-121.html Dynamically setting up validation for editable table rows: http://www.gearheadsoftware.com/tableval-112.html http://www.gearheadsoftware.com/tableval-121.html I put a bit of explanatory text in the test pages, but I can provide more detail, if needed. These examples are adapted from the largest and most important form in the application I'm creating, and thus far, the Validate plugin has been an indispensable tool in creating the UI. I would really like to continue using it to implement the functionality I need, but I have to be able to support these use cases, so I'm willing to put in whatever effort required to make it work. :) Many thanks, Bryce Lohr On Apr 10, 6:23 pm, Jörn Zaefferer [EMAIL PROTECTED] wrote: Bryce Lohr schrieb: [...] If you have any suggestions, or alternate strategies, I'd be quite grateful. Also, if solved, would you consider adding the patch back to the main distributed version? The added flexibility should be useful beyond just my case. You are right that the plugin brokebackwardscompability in a few ways, but so far you are the only one to report this issue. It would definitely help if you could provide a few more concrete examples - I'd like to evaluate if there are viable options to solve your problem without giving up the form-per-validator design. A key feature of that is the ability to freely add and remove elements from a form, without having to care about manully initializing validation for those or caring about event handlers. Jörn
[jQuery] Draggable table layout sorter
Hi guys, I am creating a very simple data entry screen where a user can enter a block of numbers then position them in the right columns of a table. For example: Col A | Col B | Col C | Col D 5 | 3| 12 | 14 9 | 4| 7 | The first line is correct data but the second line needs picking up and dragging across one column because it is actually column A which is blank. I want the user to be able to pick up the row and move it so that I can then save it to a database. The bit I am struggling with is how to specify that 9 does belong to column B after the user has dragged it across. Can I drag across table cells or DIVs or something else? I want the table to look like below after I have dragged the data across. Col A | Col B | Col C | Col D 5 | 3| 12 | 14 | 9| 4 | 7 Regards, Ian.
[jQuery] Re: Problems with JQuery Cycle Plugin and IE6
Hi Mike, Thanks for replying I am a newbie with this so appreciate your help. I've changed my code now so that in head I have: script type=text/javascript $(function() { $('#s1').cycle(); }); /script and I deleted: codescript type=text/javascript$('#s1').cycle('fade');/script/ code from the body so that the images I want to fade look like this: div id=s1 img src=images/bag_cycle_1.jpg alt=Insulated cool bags - protects chilled and frozen foods / img src=images/bag_cycle_2.jpg alt=Personalise your carrier bags - Promotional cool bags - medium / img src=images/bag_cycle_3.jpg alt=Below zero cool bag class=float_right / img src=images/bag_cycle_4.jpg alt=Trolley bag / /div Unfortunately, I am having problems with my server at the moment so I could only test this locally. It still isn't working though. Now IE6 crashes before it loads any of the page. I'm sure I'm missing something really obvious. Thanks Kirsty On Apr 11, 12:00 pm, Mike Alsup [EMAIL PROTECTED] wrote: Hi, I'm relatively new to using JQuery so maybe making a newbie error bt can't see where. I've installed the JQuery Cycle Plugin on the homepage of a website I've built and it works perfectly in Firefox, Safari, and IE7 but it crashes IE6. I have used this plugin before and it worked perfectly in all browsers and I can't see that I've done anything different. The line that is causing the crash is: codescript type=text/javascript$('#s1').cycle('fade');/script/ code When I comment this line out IE6 loads the page. I can't find any documentation on a bug in this plugin so I'm at a loss. This is the page that crashes: http://www.admgroup.entadsl.com/bg_bags/index.php and this is the website for the plugin I'm using: http://www.malsup.com/jquery/cycle/ If anyone can help??? Kirsty Looks like you copied my example page, but you've got some extra cruft in there. This is how I drive my demo pages: script type=text/javascript $(function() { // run the code in the markup! $('code').each(function() { eval($(this).text()); });}); /script ... precode$('#s1').cycle('fade');/code/pre but I only code it that way to ensure that my examples are accurate. And in your case you have an extra script tag that is unneeded: codescript type=text/javascript$('#s1').cycle('fade');/script/code But really you should change all that code and write it the easy way. All you need is the following: script type=text/javascript $(function() { $('#s1').cycle();}); /script- Hide quoted text - - Show quoted text -
[jQuery] Re: blockUI
checl also these demos, seems it's like what you are looking for BlockUI Plugin http://www.malsup.com/jquery/block/#demos On Apr 10, 5:07 pm, Mike Alsup [EMAIL PROTECTED] wrote: I have to implement this scenario: in a web page all the stuff contained in the web page must be blocked and only the images should be visible. How do I create an overlay with jquery having glossy all the images and opaque the rest? Are you looking for something like Thickbox? http://jquery.com/demo/thickbox/
[jQuery] Re: How to use jFrame Plug-In
Can anyone pls assist. Thanks. Tony. On Apr 11, 3:04 pm, tfat [EMAIL PROTECTED] wrote: Hi, Trying to get the jFrame plug-in to work but unsure how to use it. (see:http://plugins.jquery.com/project/jframe) I have set-up the follow div, i.e: div id=content src=#/div and then make a call to: jQuery(#content).loadJFrame(returnURL); Have also included all necessary js libraries. The div loads successfully but I get a javascript error: Line: 200364044 Char: 3 Error: Object doesn't support this property or method Can someone please let me know what I have missed and please correct/ show me the correct usage of this plug-in. What does the callback parameter need to be? Thanks. Tony.
[jQuery] Re: blockUI. To have a cancel button appeared after n seconds if the blockUI not unblocked
Nobody have this requirement? Cound anyone show me some light on how to deal with an uncloseable blockUI window please? This is not something the plugin is going to do for you, but you can roll you own. Here's a start: $(document).ready(function() { var t; function loadDiv() { $.blockUI(); // put close button in blocking message after 10 seconds t = setTimeout(liftBlock, 1); // make ajax call $('#myDiv').load(myUrl, function() { // clear the timeout when ajax call completes clearTimeout(t); $.unblock(); }); }; function liftBlock() { $('.blockMsg').append('button id=closeBlockClose/button'); $('#closeBlock').bind('click', $.unblockUI); }; });
[jQuery] Re: Problems with JQuery Cycle Plugin and IE6
Unfortunately, I am having problems with my server at the moment so I could only test this locally. It still isn't working though. Now IE6 crashes before it loads any of the page. I'm sure I'm missing something really obvious. Well it's not obvious to me. What is the css for s1 and the images? Does your IE6 work on my demo pages? http://malsup.com/jquery/cycle Mike
[jQuery] Re: triggering clueTip with inline javascript
Hi az, Unfortunately, I've completely lost the context for what you're doing here. Do you have a page up somewhere that we can look at to see the whole thing? That would be very helpful. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Apr 11, 2008, at 5:52 AM, az wrote: Anyone have any thoughts on this? thanks! az On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote: Hello, As I discussed in a previous post (unresponsive script error on long page with many clueTips) I'm trying to trigger clueTips with a javascript function instead of binding the clueTips on page load. Each link calls theclueTipfunction and passes its unique link id. Here is the function: functionclueTip( id ){ var linkid = '#' + id; // bind then click $(linkid).cluetip().click(); } It mostly works on Firefox, except that the waitImage is acting strangely. Sometimes it doesn't show up at all. And sometimes it shows up but in the location of the previously clickedclueTip! But the actualclueTipalways shows up in the right place. On IE7 it doesn't work at all. It's giving me an invalid argument error that seems to be caused by .click(). Any ideas? Is my approach fundamentally flawed or am I missing something small? thanks! az
[jQuery] jQ Validation display:none validation
Hi, I used the jQ validation plugin for this webpage - http://research.emedtv.com/idiopathic-pulmonary-fibrosis-research/idiopathic-pulmonary-fibrosis-clinical-study-2.html I love it! But we have dependent questions - see what happens when you click yes or no to the tobacco question. Those dependent questions are written in via JS from onclick events. I'd like to have those on the page but when I make them hidden and the user clicks submit the validator still tries to validate it. Solutions? Maybe the onclick displays them and gives them the class value required? But I like my little JS script that makes all the input tags required that are on the page when the page loads. Thanks, Alex http://www.alexgrande.com http://www.thetruetribe.com
[jQuery] Re: learning jquery
Probably a book is the best solution... but if you are not sure yet (about if you really like jQuery and want to learn it) you can find some good tutorials online... I think you already know this link... but anyway... http://docs.jquery.com/Tutorials Some of them are very well made and a good point to start! byeee On Apr 11, 3:16 pm, Snef [EMAIL PROTECTED] wrote: Received my copy yesterday. Nice to read, easy to understand. I'd recommend it. (ordered another jQuery book also, that will be delivered next week) Further: look at examples and google a bit. A lot of examples can be found! upandhigh wrote: Read JQuery in Action book, you can found on main site links to it. it's really good and compact written and easy to understand. On Apr 11, 11:44 am, sebey [EMAIL PROTECTED] wrote: what is the best way to learn jquery? quickly and easliy
[jQuery] Cycle plugin not working in IE - (I probably screwed something up!)
Hey all, I've got the cycle plugin up and running in Firefox (mac/pc) and Safari/mac, but It's not running in IE7 or Opera/mac. I must have missed something. (I'm a css dev, but not great with js). Would you mind having a peek to see where I must have slipped up? http://aloestudios.com/projects/md/bh/ thank you!
[jQuery] Need jQuery plugin for artwork display
I'm looking for a jQuery extension to show off artwork. Maybe 10 to 100 paintings. Maybe more. There are so many jQuery extensions I need some help finding the needle in the haystack. Any recommendation appreciated. Is there anything that will perform album cover flipping like iTunes? Thanks, SC
[jQuery] Re: Cycle plugin not working in IE - (I probably screwed something up!)
You need to remove the trailing comma in functions.js: pager: '#slide-numbers', On Fri, Apr 11, 2008 at 1:38 PM, Andy Ford [EMAIL PROTECTED] wrote: Hey all, I've got the cycle plugin up and running in Firefox (mac/pc) and Safari/mac, but It's not running in IE7 or Opera/mac. I must have missed something. (I'm a css dev, but not great with js). Would you mind having a peek to see where I must have slipped up? http://aloestudios.com/projects/md/bh/ thank you!
[jQuery] Jquery, AJAX and MySQL update
Hi, I hope someone can help me with this. I've been reading jquery.com tutorials and others online to try and create a sortable drag and drop list which updates a mysql table using AJAX. After a few hours of head scratching I finally got most of it, but I'm stuck on the bit that passes the serialised data via AJAX to the script. Here is the script. script $(document).ready(function(){ $(#list).sortable({ accept: 'item', update: function(sorted) { serial = $('#list').sortable('serialize'); $.ajax({ url:updatesql.php, type:POST, data: serial.hash, error:function(){alert('Failed');}, success:function(){alert('Success');} }); } }); }); /script If I replace the line data: serial.hash with data: name=Johnlocation=Boston as in the jquery.com example then my updatesql.php file will run - obviously without the correct data. So I'm guessing that's the offending line. Can someone see an obvious problem? I can post the full HTML/PHP code if required although this is the offending bit. I'm using jquery-1.2.4a.js, ui.base.min.js, ui.draggable.min.js, ui.droppable.min.js, ui.sortable.min.js. Hope someone can help, Thanks in advance, Chris.
[jQuery] Re: corner plugin on Safari
The problem in the corner rendering seems to only come if there is a delay in getting the css. This only happens in Safari 3.1 that I can see. Here's a test case. --- !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; xml:lang=en lang=en head titletitle/title link rel=stylesheet href=corner_test.css.php charset=utf-8 / script type=text/javascript charset=utf-8 src=jquery.js/ script script type=text/javascript charset=utf-8 src=jquery.corner.js/script script type=text/javascript $(document).ready(function() { $(div).corner(); }); /script /head body div Text /div /body /html --- and here's the css.php file --- ?php header('content-type:text/css'); sleep(1); ? html { background-color: #3e4c54; } div { background: #1c282f; } ---
[jQuery] Re: corner plugin on Safari
The problem in the corner rendering seems to only come if there is a delay in getting the css. This only happens in Safari 3.1 that I can see. Here's a test case. I guess that makes sense. The corner script tries to determine the appropriate color for the corners that it rounds. In this case it would seem that the right corner color changes after the script has run.
[jQuery] Re: corner plugin on Safari
On Apr 11, 2:02 pm, Mike Alsup [EMAIL PROTECTED] wrote: I guess that makes sense. The corner script tries to determine the appropriate color for the corners that it rounds. In this case it would seem that the right corner color changes after the script has run. Any ideas why this would have changed from Safari 3.0 to 3.1? Is it telling the document that it's ready earlier than it used to maybe?
[jQuery] Re: Cycle plugin not working in IE - (I probably screwed something up!)
perfect! Thank you so much for taking the time to look this over and post your feedback. I figured it had to be something along these lines, but I just couldn't find it. Interesting how the different browsers handle things like this. Thank you thank you thank you! On Apr 11, 11:23 am, Mike Alsup [EMAIL PROTECTED] wrote: You need to remove the trailing comma in functions.js: pager: '#slide-numbers', On Fri, Apr 11, 2008 at 1:38 PM, Andy Ford [EMAIL PROTECTED] wrote: Hey all, I've got the cycle plugin up and running in Firefox (mac/pc) and Safari/mac, but It's not running in IE7 or Opera/mac. I must have missed something. (I'm a css dev, but not great with js). Would you mind having a peek to see where I must have slipped up? http://aloestudios.com/projects/md/bh/ thank you!
[jQuery] Re: Jquery, AJAX and MySQL update
Chris Jones wrote: script $(document).ready(function(){ $(#list).sortable({ accept: 'item', update: function(sorted) { serial = $('#list').sortable('serialize'); $.ajax({ url:updatesql.php, type:POST, data: serial.hash, error:function(){alert('Failed');}, success:function(){alert('Success');} }); } }); }); /script Have you tried doing an alert on serial.hash? I don't know that property. The sortable('serialize') function returns a String that should be all set for being part of a URL, so you might just try data: serial, Where is that hash property defined? -- Scott
[jQuery] Resizing table columns with colspan
I've been successful keeping a couple tables in sync with regard to the column widths for some time. Nothing fancy here; both tables have the same number of columns and one table is the master with the data, and the other is a header table. I set the column widths on the header table to the values provided by the master. I'm using jQuery's builtin width() function for reading and writing this property. Works great. NowI need to add a new row to my header table, and the columns in this row will have a colspan. Now there is no resizing taking place, anywhere. No browser I have tested on (FF2, IE6, IE7) works. The last row of my header table has the same number of columns as the data table. I thought simply picking that row as the resize target will cause the rows above it (with the colspans) to automatically adjust. No dice. I then tried starting with the colspan cells and setting their width along with the other rows widths. No dice. Anyone have a solution to this, or have seen an example with colspans that seems to be working? -- jim
[jQuery] help with regex? converting plain text with line breaks to ol with lis
It's a bit off topic, perhaps, but using jQuery I want to get the contents of a plain text file, and convert each line to a list item in an ordered list. Being a designer, the regular expression syntax just stumps me... \n\r\??? Can anyone nudge me in the right direction? rolfsf
[jQuery] Re: Jquery, AJAX and MySQL update
yeah, the other method of passing data via ajax is: ... url: myurl.php, type: post, data: {variablename:value, variablename2:someJSValue}, ... you could declare an object that contains your arguments that you want to pass in to updatesql.php like this: var args = {} args.name = John args.location = Brisbane args.SomeOtherVariable = someJSVariable then you could do: ... url: myurl.php, type: post, data: args, ... where args is the object that you just created. Hope this helps! :o) Chris On Fri, Apr 11, 2008 at 2:36 PM, Scott Sauyet [EMAIL PROTECTED] wrote: Chris Jones wrote: script $(document).ready(function(){ $(#list).sortable({ accept: 'item', update: function(sorted) { serial = $('#list').sortable('serialize'); $.ajax({ url:updatesql.php, type:POST, data: serial.hash, error:function(){alert('Failed');}, success:function(){alert('Success');} }); } }); }); /script Have you tried doing an alert on serial.hash? I don't know that property. The sortable('serialize') function returns a String that should be all set for being part of a URL, so you might just try data: serial, Where is that hash property defined? -- Scott -- http://cjordan.us
[jQuery] Re: Jquery, AJAX and MySQL update
Hi Scott, The hash was a suggestion on another site. I have tried it without it as well but no joy. If I alert the serial on success I get what I would expect ie. item[]=2item[]=3item[]=10 At the moment the updatesql.php file is simply setup so if the page is called it connects to the database and updates a record. I dont make use of the 'serial' data. This is how I know its not working. If I do : data: serial.hash or data: serial, = nothing gets updated. data: name=Johnlocation=Boston = the table gets updated via updatesql.php Chris. Scott Sauyet wrote: Chris Jones wrote: script $(document).ready(function(){ $(#list).sortable({ accept: 'item', update: function(sorted) { serial = $('#list').sortable('serialize'); $.ajax({ url:updatesql.php, type:POST, data: serial.hash, error:function(){alert('Failed');}, success:function(){alert('Success');} }); } }); }); /script Have you tried doing an alert on serial.hash? I don't know that property. The sortable('serialize') function returns a String that should be all set for being part of a URL, so you might just try data: serial, Where is that hash property defined? -- Scott
[jQuery] Re: Improving upon the jQuery Plugin Template
Thanks Ariel, that's a way of exposing an external api that I hadn't thought of. -- jim
[jQuery] Detecting Javascript error in IE and then displaying a more helpful message to the user
We're noticing that some users of Windows Vista are getting Javascript errors and are not able to use our site. Is it possible to use jQuery to detect when there's a Javascript error and then display our own customized alert statement to help them fix it?
[jQuery] Re: Jquery, AJAX and MySQL update
Chris Jones wrote: The hash was a suggestion on another site. I have tried it without it as well but no joy. If I alert the serial on success I get what I would expect ie. item[]=2item[]=3item[]=10 [ ... ] data: serial.hash or data: serial, = nothing gets updated. data: name=Johnlocation=Boston = the table gets updated via updatesql.php Is that on success based upon the AJAX success function? If so, then your PHP is actually responding with a good error code, and you need to do some fiddling in the PHP to see what's happening. If you don't get that far, I would suggest something like the LiveHTTPHeaders plugin for Firefox to do some testing on the client side. Sorry I don't have more definitive answers. Good luck, -- Scott
[jQuery] Re: Detecting Javascript error in IE and then displaying a more helpful message to the user
You can use plain vanilla Javascript try/catch to catch the errors. That being said, you should probably track down exactly what the errors are, and try to eliminate them. Testing in IE6/7 is important, as there are some errors which do not show up in Firefox (trailing commas are a big one) that will cause error alerts in IE. -- Josh - Original Message - From: cfdvlpr [EMAIL PROTECTED] To: jQuery (English) jquery-en@googlegroups.com Sent: Friday, April 11, 2008 1:41 PM Subject: [jQuery] Detecting Javascript error in IE and then displaying a more helpful message to the user We're noticing that some users of Windows Vista are getting Javascript errors and are not able to use our site. Is it possible to use jQuery to detect when there's a Javascript error and then display our own customized alert statement to help them fix it?
[jQuery] Re: Detecting Javascript error in IE and then displaying a more helpful message to the user
Well, the problem was fixed by doing a Reset Internet Explorer Settings which makes me think it's not a problem with our code, but with the browser going wonky itself. I was thinking of using jQuery to detect if there's an error and if the browser IE7/Vista and then displaying an alert statement asking the user to try Resetting their Internet Explorer Settings.
[jQuery] Re: Jquery, AJAX and MySQL update
Chris, The hash idea that the other site was talking about is what I was telling you in my previous post. I do this all the time: function myFunction(email){ var args = {}; args.name = $('#nameid').val(); args.location = $('#locationid').val(); args.email = email; args.someStringLiteral = I am a string!; $.ajax({ url:updatesql.php, type:post, data: args, error:function(){ alert('Failed'); }, success:function(){ alert('Success'); } }); } Note that in JavaScript what a hash (or what I would call a structure) is also an associative array, and it's an object, and both can be accessed using either dot or array notation. So if you had an object (hash/structure/associative array) called 'session' you could access the 'loggedin' property by saying session.loggedin or session['loggedin']. You could set up that hash/associative array/struct/object as I've mentioned above: var session = {}; session.loggedin = true; or var session = {loggedin:true}; Check this excellent page (http://www.quirksmode.org/js/associative.html) for much more detailed information. :o) jQuery will take an object like this and translate it into the name=Johnlocation=Boston for you. I find passing an object of arguments easier and more preferable (personally) than passing name=Johnlocation=Boston. Chris On Fri, Apr 11, 2008 at 3:57 PM, Scott Sauyet [EMAIL PROTECTED] wrote: Chris Jones wrote: The hash was a suggestion on another site. I have tried it without it as well but no joy. If I alert the serial on success I get what I would expect ie. item[]=2item[]=3item[]=10 [ ... ] data: serial.hash or data: serial, = nothing gets updated. data: name=Johnlocation=Boston = the table gets updated via updatesql.php Is that on success based upon the AJAX success function? If so, then your PHP is actually responding with a good error code, and you need to do some fiddling in the PHP to see what's happening. If you don't get that far, I would suggest something like the LiveHTTPHeaders plugin for Firefox to do some testing on the client side. Sorry I don't have more definitive answers. Good luck, -- Scott -- http://cjordan.us
[jQuery] Re: help with regex? converting plain text with line breaks to ol with lis
line 1: var text = 'one\ntwo\nthree\nfour';//example line 2a: var html = 'li' + text.split(/[\n\r]+/).join('/lili') + '/li'; or line 2b: var html = text.replace(/(.+?)(?:[\n\r]+|$)/g, 'li$1/ li'); line 3: $('ol /').html( html ).appendTo('body');//example I advice using 2a. Cheers -- Ariel Flesler http://flesler.blogspot.com On 11 abr, 16:54, rolfsf [EMAIL PROTECTED] wrote: It's a bit off topic, perhaps, but using jQuery I want to get the contents of a plain text file, and convert each line to a list item in an ordered list. Being a designer, the regular expression syntax just stumps me... \n\r\??? Can anyone nudge me in the right direction? rolfsf
[jQuery] Re: help with regex? converting plain text with line breaks to ol with lis
Thank Ariel So the first line creates a variable of all the text, line 2a puts an initial li, and then splits the text at each line break adding /lili, and finally adding the final /li Line 3 wraps the whole thing in an ol (so jQuery automagically closes the tag?) thanks so much rolfsf On Apr 11, 2:57 pm, Ariel Flesler [EMAIL PROTECTED] wrote: line 1: var text = 'one\ntwo\nthree\nfour';//example line 2a: var html = 'li' + text.split(/[\n\r]+/).join('/lili') + '/li'; or line 2b: var html = text.replace(/(.+?)(?:[\n\r]+|$)/g, 'li$1/ li'); line 3: $('ol /').html( html ).appendTo('body');//example I advice using 2a. Cheers -- Ariel Fleslerhttp://flesler.blogspot.com On 11 abr, 16:54, rolfsf [EMAIL PROTECTED] wrote: It's a bit off topic, perhaps, but using jQuery I want to get the contents of a plain text file, and convert each line to a list item in an ordered list. Being a designer, the regular expression syntax just stumps me... \n\r\??? Can anyone nudge me in the right direction? rolfsf
[jQuery] Problem whith ie 7 and slideDown
Hi, i hae the following code: $(document).ready(function(){ $('#txtSearch').attr('value', 'Enter Search tags for skills or functions').focus(function(){ $(this).attr('value', ''); showSearchBox(); }) }); function showSearchBox(){ $('#searchBox').slideDown(); } function hideSearchBox(){ $('#searchBox').slideUp(); $('#txtSearch').attr('value', 'Enter Search tags for skills or functions'); } function showMessagesBox(){ $('#messagesBox').slideDown(); } function hideMessagesBox(){ $('#messagesBox').slideUp(); } this is the HTML: body div id=header table width=100% cellpadding=0 cellspacing=0 tr tdimg src=/img/logo.gif/td td align=center span id=settingssettings/span span id=logoutlogout/spanbr span id=messagesa href=javascript: void 0; onclick=showMessagesBox();MESSAGES(13)/a/span /td /tr /table /div div id=searchInputinput type=text id=txtSearch size=40// div div id=messagesBox a href=javascript: void: 0 onclick=hideMessagesBox();Close/a /div div id=searchBox table width=100% tr td table tr tdCurrent/Last Job Company/td tdinput type=text id=lastJobCompany//td /tr tr tdCurrent/Last Job Title/td tdinput type=text id=lastJobTitle//td /tr /table table tr tdMin. Base Pay/td td select id=basePayTime option value=yearlyYearly /select select id=basePayMoney option value=3-45000$30,000-45,000 /select /td tr td Work Type /td td input type=checkbox value=full id=chkJobTypeFulllabel for=chkJobTypeFullFull-time/label input type=checkbox value=contract id=chkJobTypeContracrlabel for=chkJobTypeContracrContract/ label /td /tr tr tdEducation/td td select id=educationSelect option4 Year Degree /select /td /tr tr tdLocation/td td input type=radio name=location value=local checked id=localLocation label for=locationLocalLocal Only/label input type=radio name=location value=relocation id=localRelocation label for=locationRelocationWould consider
[jQuery] Jquery cycle plugin and images included dynamically
Hi, I am using the jquery cycle plugin for slide effects of images being included dynamically to the website. Unfortunately, the images in the hidden divs will not show in their original size once being showed from the cycle script - just a icon size image is visible. How can i change this to maintain the real image size in all (also hidden) divs?
[jQuery] Re: help with regex? converting plain text with line breaks to ol with lis
$('ol /').html( html ).appendTo('body');//example It is closed, not the ending slash. I was just exemplifying, you can use innerHTML, or whatever you want. Cheers -- Ariel Flesler http://flesler.blogspot.com On 11 abr, 20:54, rolfsf [EMAIL PROTECTED] wrote: Thank Ariel So the first line creates a variable of all the text, line 2a puts an initial li, and then splits the text at each line break adding /lili, and finally adding the final /li Line 3 wraps the whole thing in an ol (so jQuery automagically closes the tag?) thanks so much rolfsf On Apr 11, 2:57 pm, Ariel Flesler [EMAIL PROTECTED] wrote: line 1: var text = 'one\ntwo\nthree\nfour';//example line 2a: var html = 'li' + text.split(/[\n\r]+/).join('/lili') + '/li'; or line 2b: var html = text.replace(/(.+?)(?:[\n\r]+|$)/g, 'li$1/ li'); line 3: $('ol /').html( html ).appendTo('body');//example I advice using 2a. Cheers -- Ariel Fleslerhttp://flesler.blogspot.com On 11 abr, 16:54, rolfsf [EMAIL PROTECTED] wrote: It's a bit off topic, perhaps, but using jQuery I want to get the contents of a plain text file, and convert each line to a list item in an ordered list. Being a designer, the regular expression syntax just stumps me... \n\r\??? Can anyone nudge me in the right direction? rolfsf- Ocultar texto de la cita - - Mostrar texto de la cita -