[jQuery] Re: jQuery UI Datepicker v3.0 Released! (Previously named jQuery Calendar)
I just have a small usuability suggestion for a future release In the Date Range implementation, make it so you could pick the either start or end date at any time... so just say a user choses Nov 20th first, then selects Nov 5th (whcih currently isn't possible as it locks out previous dates), it should be an easy check to flip-flop the dates so the first selection is the end date and the second selection is the begin Just a suggestion to a top notch date picker
[jQuery] Re: jQuery.easing[this.options.easing || (jQuery.easing.swing ? swing : linear)] is not a function
I ran into this error today and realized i had the ease method spelled wrong (had 'easeOutBonce' - no u) Fixing the misspell got rid of the error that is in the subject line of this thread :-) On Nov 9, 10:28 am, George GSGD [EMAIL PROTECTED] wrote: Can you give me some example code? Generally if there's a problem with callbacks it's a syntax error. On Nov 9, 7:39 am, Tóbi [EMAIL PROTECTED] wrote: I think there is a bug. When I call the slideIn/Out function I get errors as well, because when the function called then it call the animate func but with wrong parameter order/count. The animate funct get the callback fn (if it presents) as easing parameter. This is a bug, isn't it?
[jQuery] Creating simple jQuery/JSON result with ASP.NET
Good morning all. I've got a call to an aspx page, nice and simple, the alerts are just to test: function SaveThis(key, val) { $.post(/services/process/config.aspx, { Key: key, Value : val }, function(data){ alert(data); alert(data.Results); } ); } The alerts are just for testing obviously, but i am just keeping it simple anyways, the config.aspx simply says: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim Results As String Try If _ConfigSettings.Set(Request.Form(Key), Request.Form(Value)) 0 Then Results = Saved! Else Results = Error: not saved End If Catch ex As Exception Results = Error: ex.Message End Try Response.Clear() Response.Cache.SetCacheability(HttpCacheability.NoCache) Response.ContentType = text/plain Response.Write(String.Format({ Results : {0} }, Results)) Response.Flush() End Sub So i am trying to return in plain text this: { Results : Saved! } But the second alert in my jQuery block says null for data.Results I am missing something? Also, i know about that class that someone made to turn a .NET class into a JSON object, but i am just after simple results to start with... Thanks in advance - Stephen
[jQuery] Re: Creating simple jQuery/JSON result with ASP.NET
But what about returning a JSON object? (not just plain text) Like as i get more into jQuery and AJAX i'd like to return some more complicated objects from my aspx code On Dec 8, 11:15 am, Tony [EMAIL PROTECTED] wrote: Hi, maybe you missed this function SaveThis(key, val) { $.post(/services/process/config.aspx, { Key: key, Value : val }, function(data){ alert(data.responseText); } ); Tony On 8 Дек, 17:12, MorningZ [EMAIL PROTECTED] wrote: Good morning all. I've got a call to an aspx page, nice and simple, the alerts are just to test: function SaveThis(key, val) { $.post(/services/process/config.aspx, { Key: key, Value : val }, function(data){ alert(data); alert(data.Results); } ); } The alerts are just for testing obviously, but i am just keeping it simple anyways, the config.aspx simply says: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim Results As String Try If _ConfigSettings.Set(Request.Form(Key), Request.Form(Value)) 0 Then Results = Saved! Else Results = Error: not saved End If Catch ex As Exception Results = Error: ex.Message End Try Response.Clear() Response.Cache.SetCacheability(HttpCacheability.NoCache) Response.ContentType = text/plain Response.Write(String.Format({ Results : {0} }, Results)) Response.Flush() End Sub So i am trying to return in plain text this: { Results : Saved! } But the second alert in my jQuery block says null for data.Results I am missing something? Also, i know about that class that someone made to turn a .NET class into a JSON object, but i am just after simple results to start with... Thanks in advance - Stephen
[jQuery] Re: newbie - need help finding element
$('#img'+j).fadeIn(slow); // fade in selected image (this is what doesn't work, obviously) Did you notice that no where did you define or set variable j ? On Dec 5, 8:15 pm, HXn [EMAIL PROTECTED] wrote: Hi, I'm brand new to jQuery. Here's what I'm trying to achieve: I have an unordered list that contains thumbnails for a photo gallery, generated dynamically with PHP: div id=gallery ul li id=left/li li class=selected style=background: url(weddings-gallery/thumbs/ _DSC3950.jpg) no-repeat; div img id=img0 class=start src=weddings-gallery/images/ _DSC3950.jpg title= alt= / /div /li li class= style=background: url(weddings-gallery/thumbs/ _DSC4103.jpg) no-repeat; div img id=img1 style=display: none; src=weddings-gallery/images/ _DSC4103.jpg title= alt= / /div /li ... (The img ID is generated incrementally with PHP.) When an LI is clicked, the image currently showing fades out and the LI that was clicked is supposed to cause its corresponding image to fade in. jQuery script I have so far: $(document).ready(function(){ $('#gallery ul li').click(function() { $('#gallery ul li').removeClass('selected'); $('#gallery ul li').removeClass('thumb-hover'); $(this).addClass('selected'); var getLi = document.getElementById('gallery').getElementsByTagName('li'); for (var i=0; igetLi.length; i++) { $('#img'+i).fadeOut(slow); // fade out all images } $('#img'+j).fadeIn(slow); // fade in selected image (this is what doesn't work, obviously) }); }); How do I achieve this? With strictly PHP, I could pass the integer that corresponds to which 'img' I need to show (e.g., 0 for img0). I'm not sure how to do this with jQuery. Thanks
[jQuery] Re: Help Test jQuery 1.2.2
John, Is there anything out there that points out the differences between 1.2 and this new version? I just went through browsing the Wiki and didn't see anything like that On Dec 16, 9:47 pm, John Resig [EMAIL PROTECTED] wrote: Hey Everyone - We just pushed a beta copy of jQuery 1.2.2 live. We'd love for everyone to help test this release and make sure that it's in tip-top shape. Please use the unpacked version, it'll make it easier for us to spot/close bugs.http://code.jquery.com/jquery-1.2.2b.js Here's the full list of closed bugs:http://dev.jquery.com/report/22 If you spot a bug, please submit it to the bug tracker:http://dev.jquery.com/newticket Please pay special attention to $(document).ready(), .hover(). .width(), .height(), and the Ajax JSONP stuff - they've all seen a lot of love and may bring some unforeseen issues. Finally, I would like to personally thank David Serduke and Brandon Aaron for making this release possible. With their help, this release should be top-notch. Depending on how smooth this beta goes, you can probably expect the full release here within the next couple days, just in time for the holidays. --John
[jQuery] Re: general unique id for new append element
Why not just keep a global variable, like: var _id = 0; and when you create the new item, use that counter to make like New_ + _id, and then increment the counter
[jQuery] Superfish: problems with second tier
I've got this simple menu: ul id=NavMenu class=nav lia href=/default.aspxHome/a/li lia href=#Reports/a/li lia href=#Testing/a/li lia href=#Links/a/li lia href=#Profile/a/li li a href=#Info/a ul lia href=#One/a/li lia href=#Two/a/li lia href=#Three/a/li lia href=#Four/a/li lia href=#Five/a/li lia href=#Six/a/li /ul /li /ul So there's 6 items on the top level... on the last part there, i've got 6 sub items, but when they show, it shows 5 across (with there being a blank spot under Info) and then Six gets put on a third tier under One I am seeing this in both FF 2 and IE 7... any ideas? Also, is there a clear concrete solution to getting the menu to appear over flash objects? i see a few past topics on the problem but no decent solutions
[jQuery] Example of show callback for UI.Tabs?
Anyone have an example of using the show callback of the UI.Tabs? I am having a problem where for a second or two on initial page load the un-jQuery-tabbed ul list is showing, and then when the .tabs() gets run then it shows the tabbed display that i want So i figured i would set the main div to display: none and then on that show event unhide the div so then instead the user would see a blank area and then the fully tabbed interface I see the option in the ui.tabs.js file: $.ui.tabs = function(el, options) { this.source = el; this.options = $.extend({ // basic setup initial: 0, // callbacks add: function() {}, remove: function() {}, enable: function() {}, disable: function() {}, click: function() {}, hide: function() {}, show: function() {}, and I tried this simple setup: $(#TabContainer ul).tabs({ show: function() { alert('Show Event') } }); but there is no reference in the rest of the js of that option/ event... (perhaps it is an incomplete feature?) Maybe some other advice on how to avoid seeing the untabbed ul to start? Thanks in advance
[jQuery] Re: Example of show callback for UI.Tabs?
All right, so after messing around with this i realize now that the show event fires when the tab is shown (read: clicked on a tab and then the content shows and then that event fires) So maybe this is more in a general jQuery on how to attach an event when jQuery is done doing it's thing ex/ $(#TabContainer ul).tabs(); fire event when this is complete
[jQuery] Re: Example of show callback for UI.Tabs?
Yeah, sometimes it's so much simplier than one makes it out to be :-) Simply starting a wrapping div as display: none and then using the .show() jQuery method on the line after the .tabs() call did the trick :-) If there's one thing i am really good at is over-complicating things, heh heh
[jQuery] Re: Using getJSON...not successful
Also i'd suggest using Firebug (http://www.getfirebug.com/), it's Console tab will tell you errors in the Ajax call as well On Jan 19, 10:29 am, Rick Faircloth [EMAIL PROTECTED] wrote: Now, I've never used Ajax, so this is just a short in the dark at the broad side of a barn. With that in mind, I was wondering if the /mysite/myajax part shouldn't have an extension on the myajax part, as in myajax.html or something? If not why not? Isn't that referring to a specific page on your site? Rick -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gms Sent: Friday, January 18, 2008 6:13 PM To: jQuery (English) Subject: [jQuery] Using getJSON...not successful Hello, I am new to JQuery. I'm trying to get a JSON response back from my django view. However, I guess my data never gets loaded successfully. Does anybody know what I'm doing wrong? script $(document).ready(function(){ $(#first).click(function(){ $.getJSON(/mysite/myajax, function(data) { alert(Here); }); }); }); /script def myajax(request): a = Testimonial.objects.all()[:3] response_dict = {} response_dict.update({'a': a}) return HttpResponse(simplejson.dumps(response_dict), mimetype='application/javascript') /// Whenever I access this page and click on my div that contains the id 'first'...nothing happens. I should see an alert that says 'Here'. Any Suggestions on what I'm doing wrong? Thanks
[jQuery] Re: using a different tag than label for error messages
But you brought up semantics, to which the label makes way more sense in that way in this situation The error message is a label for the control (and clicking on it because of the for parameter) sets focus on said control Personally i think your premise of screen readers getting confused is not a valid one, but it's not my app :-) On Jan 24, 7:10 am, Dave Stewart [EMAIL PROTECTED] wrote: SORRY - the word [jQuery Validation Plugin] was supposed to appear in the title, but didn't. Hello Diego, Sorry, it's a separate question, actually. I've re-stated the first post question to clarify things, so sorry for the ambiguity. To restate the problem: Using the jQuery Validation Plugin, you can associate an element (in this case a label) with a form element in which you might display an validation error message when validating the form. The way how the plugin seems to work is to look for an associated label using the label's for attribute. I want to know if I can use any other element, such as a div, rather than a label, as I'm already using one label. (I'm going on the premise that having 2 labels would be confusing for screen readers) Thanks, Dave
[jQuery] Selecting listboxes that are in a table
If i have: table id=ColumnEdit tr thGroup/th tdselect id=drp_Group class=group //td /tr tr thCompany Type/th tdselect id=lst_CompanyType multiple=multiple //td /tr tr thRoles/th tdselect id=lst_Roles multiple=multiple class=role //td /tr /table Shouldn't $(#ColumnEdit select) Provide me a jQuery array of those select boxes? if i say: alert('Selects Found: ' + $(#ColumnEdit select).size()); i get Selects Found: 0... i even tried: alert('Selects Found: ' + $(#ColumnEdit tr td select).size()); and still get 0 Is the fact I am expecting 3, in either jQuery selector, not correct?
[jQuery] Re: jQuery, AJAH IE 7
Got the page live somewhere to look at? Also, have you tried using Fiddler (http://www.fiddlertool.com/ fiddler/) to see the client request/response for errors? On Jan 24, 4:39 pm, Vlad Mazek [EMAIL PROTECTED] wrote: Folks, I have a bit of a problem with Internet Explorer 6/7 specifically, the code works perfectly fine in Firefox. What I am essentially doing is creating a dynamic form. Based on the inputs, different forms are sent back into different div containers as the user moves through the application. The first request receives the set of forms (really just prefilled html/form markup) just fine. Working with this second set of forms and jQuery in Internet Explorer 7 seems to be futile - no response at all to any jQuery functions. All my posts push the browser forward, calls to my javascript functions come back with Error - Object Expected, none of my jQuery effects seem to work.. even though all the forms are on the same page. I'm afraid I'm missing something pretty grand in terms of concepts here and was hoping someone would be kind enough to explain just where I am going wrong about this. Thanks in advance!
[jQuery] Re: using a different tag than label for error messages
On Jan 25, 4:24 am, Dave Stewart [EMAIL PROTECTED] wrote: Hi MorningZ, I just did some quick Googling on the matter, and turned up this useful link: http://www.456bereastreet.com/archive/200711/use_the_label_element_to... I just had to laugh at this line in that link: I always use and recommend explicit association since it feels less awkward and more exact, and has better browser compatibility (IE 6 only makes explicitly associated labels clickable the death of IE6 can't come soon enough
[jQuery] Re: Selecting listboxes that are in a table
$(#ColumnEdit select) Worked... thanks That said, I'm surprised #ColumnEdit tr td select did not return any matches As was I and the select boxes have options defined, i was just shorthanding the code for brevity's sake in my original post On Jan 25, 3:03 am, George [EMAIL PROTECTED] wrote: Hi there, The selector only matches an immediate child so in your example, the only children of #ColumnEdit are tr elements, not select elements. That said, I'm surprised #ColumnEdit tr td select did not return any matches. Could it be because you've used a self-closing tag instead of select.../select ? If you simply leave a space between #ColumnEdit and select then jQuery will delve deeper for you and find what you want. George On Jan 24, 9:49 pm, MorningZ [EMAIL PROTECTED] wrote: Shouldn't $(#ColumnEdit select) Provide me a jQuery array of those select boxes?
[jQuery] Re: UI.TABS - how to load content when tab is selected
Look at the Ajax Tabs section of the Tabs demo page (http:// stilbuero.de/jquery/tabs_3/) On Jan 30, 9:14 am, carvingcode [EMAIL PROTECTED] wrote: I have a tab that I don't want the content (generated from a separate .php file) to load untilt he user selects the tab. How can I do this? TIA
[jQuery] Re: is there autoscrolling in jQuery?
That is pretty cool functionality I don't think there is anything but in scroll wise in jQuery core, but there is an excellent plugin called ScrollTo, it's very flexible and usefull... might be worth checking out: http://plugins.jquery.com/project/ScrollTo Off the top of my head, you could have an image like that AutoScroll on the example you linked to, check the MouseOver for x position and kick off the ScrollTo animation with the x value of the mouse on the image as the speed... On Feb 10, 8:02 pm, Bhaarat Sharma [EMAIL PROTECTED] wrote: Hello Yesterday i came across an autoScroll feature on this linke http://www.etsy.com/time_machine2.php if you hoover on the Auto Scroll button then the div starts to scroll towards the left. the speed can be increased or decreased based on how far you have hooverd on the Auto Scroll button. I was really impressed with this functionality. Wondering if anyone has seen something similar with jQuery? maybe a plugin or something already out there? thanks!
[jQuery] Visual Studio 2008 friendly version of 1.2.3
Saw earlier today that someone went through and commented the whole jquery.1.2.3 file so it is nice and friendly with the latest version of studio http://lancefisher.net/blog/archive/2008/02/12/intellisense-for-jquery-in-visual-studio-2008.aspx To get jQuery and intellisense working properly, there was a hotfix released the other day that makes it possible: http://blogs.msdn.com/webdevtools/archive/2008/02/08/jscript-intellisense-working-with-jquery.aspx and more info with great comments and feedback: http://www.west-wind.com/weblog/posts/251271.aspx
[jQuery] Re: jQuery BlockUI and ASP.NET
What is the function test() doing? And a better way, well my opinion anyways, would be to use two buttons, one pure HTML calling the block code, and one server side one with display: none... have the user click the HTML button/image, call your block code, and if all is well, trigger the hidden asp:button's click event
[jQuery] Re: what editor do you use?
I'm a .NET programmer, so it's Visual Studio 2008 for me and with this week's hotfix, using jQuery is a breeze inside the enviroment
[jQuery] Re: textArea select text.
I am just curious, as i am trying to learn when jQuery might be overkill..but why wouldn't that simple document.getElementById().select() not be a desirable answer? like i don't see what is, or what can be, gained by jQuery-ifying it
[jQuery] Re: tabs: Can't get tabs to work, but I'm including the right files!
Dave... here is a packed version of UITabs that works http://www.morningz.com/linked/Coding/ui.tabs.pack.js.txt Although I'm not getting JS errors any more on this page... http://elearningrd.info/tabs/docbuilder/test.php; Using Firebug, that packed version is still throwing an error (there is a missing semicolon throwing off the packing there) On Feb 13, 4:50 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: That's fine, I went ahead and downloaded the files used here,http://docs.jquery.com/UI/Tabs#Example, and I don't get any more weird JS errors. But I have another question. Although I'm not getting JS errors any more on this page... http://elearningrd.info/tabs/docbuilder/test.php the LIs still aren't displaying as tabs. I have included the style sheet and placed the images in the appropriate places, but I'm still missing something. How can I make those LIs look like tabs? Thanks, - Dave On Feb 13, 3:27 pm, Klaus Hartl [EMAIL PROTECTED] wrote: Dave, that's weird, there's a syntax error in the packed script in the second example, but the files are the same. I checked the response headers and they're different: DateWed, 13 Feb 2008 21:23:34 GMT Server Apache Connection Keep-Alive, Keep-Alive Keep-Alive timeout=15, max=98 Etagf0c5db-17d1-47b3574f vs DateWed, 13 Feb 2008 21:22:23 GMT Server Apache Last-Modified Wed, 13 Feb 2008 20:47:11 GMT Etagf0c5db-17d1-47b3574f Accept-Ranges bytes Content-Length 6097 Content-Typeapplication/x-javascript Cant tell if that's somehow wrong... --Klaus On Feb 13, 9:52 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I just downloaded the jquery tabs zip file, unzipped it and got the demo working http://elearningrd.info/tabs/scripts/tabs/ but when I try and build my own page, I get JS errors: http://elearningrd.info/tabs/docbuilder/build_doc2.php I'm including the same JS files (so I think) as the demo page, but it's clearly not enough. What gives? Thanks,- Dave- Hide quoted text - - Show quoted text -
[jQuery] Re: fastest way to load both jquery thickbox
One option is to use Dean Edward's packer tool: http://dean.edwards.name/packer/ If your packed file(s) don't work, you may need to run it through JSLint (http://dean.edwards.name/packer/) and fix it up before packing (having proper ending semicolons is a big thing to look out for)
[jQuery] Re: Best plugin for modal dialogs
Greybox Redux (http://jquery.com/blog/2006/02/10/greybox-redux/) Pros: - Written by the man himself - Handles static content as well as external links (via iframe) - Code isn't very long and is easy to modify (for instance, i didn't like the click outside the modal to close it, so i coded an option to turn it off, this was 2 lines to do so) - Doesn't require any other plugins (for instance, some others need bigiframe or dimensions) Cons: - Haven't run into anything yet
[jQuery] Re: only text rule ??
Regular expressions would be the answer var rgx = /^[A-Za-z]+$/; if (rgx.test($(#TextBoxID).val())) { // Valid } else { // Invalid }
[jQuery] Re: Please suggest minimal test of jQuery installation
btw, maybe use a tool like Fiddler (for IE) or Firebug (for Firefox) to make sure the server is serving .js files as Javascript (it'll say text/javascript as the content type in the http headers)... other than that, i couldn't see any different what server it was/is
[jQuery] Re: Please suggest minimal test of jQuery installation
What are you installing on the server? jQuery is simply a js file delivered by HTML and run on the user's browser
[jQuery] Re: determining if table contains rows
Karl (or anyone else that wants to answer), Since you answered his question, i was hoping i could ask one based on your answer Is there any difference/advantage between $('tbody tr', '#documents') and $('#documents tbody tr') I'm still only a few months into jQuery and have yet to use that second parameter on a select, wasn't sure why to use it, as both selectors seem to say find the tbody of the item #documents
[jQuery] Re: slider control how
The jQuery slider: http://docs.jquery.com/UI/Slider Plenty of options to hook into to do the on-the-fly price adjustment according to the slider's value
[jQuery] Re: Call a function just before the window close
there is an onbeforeunload event you can use http://www.google.com/search?q=javascript+onbeforeunloadie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a
[jQuery] UI Datepicker: how do i run custom event when month/year changes
For the life of me, I cannot figure out how to run my own event (in addition to the events to change the calendar) when someone presses prev, next, or changes either the month or year select items Any pointers? I have already tried like $(.datepicker_prev a).bind(click, MyEvent); but it doesn't do anything Thanks in advance
[jQuery] Re: Can JQuery do a slider/button like on yui?
UI slider would do that: http://docs.jquery.com/UI/Slider To be just like the YUI example, you'd hide the slider, show it when one clicks a button, wire the slide event and change the opacity/ button text On Mar 2, 9:11 pm, otherjohn [EMAIL PROTECTED] wrote: Hi, I would like to make a form input field that has a button attached to the side, in-which when the button is clicked, a slider bar appears for a user to slide and change the number value in the form. Basically, I am looking for something like this:http:// developer.yahoo.com/yui/examples/button/btn_example14_clean.html Can jquery easily do this and if so, can someone point me in the correct direction of a tutorial that might help me pursue this. John
[jQuery] Re: jQuery in Action
Thoughts? There's at least 4 to 5 topics so far with thoughts about this book :-)
[jQuery] Re: identify tables with same ID ( duplicate ids)
On click of a button, i add tables dynamically (using the 1st table as a template) to the page (using DOM + js). Hence i end up with multiple tables with duplicate id's Have a counter of some sort, like a global variable like var TableCount = 0; when you add, append this value to the id and increment it for the next added table To select all these tables, it's simply: $(table[id^='Instructions']) that would grab all tables that have an ID that starts with instructions
[jQuery] Re: identify tables with same ID ( duplicate ids)
It's your application and your code and your functionality... but something comes to mind So what if there are gaps in the ID name? At least that will keep them unique, and if you can use a very similar selector, just one additional character different in fact, to keep this very important base concept of DOM intact (as mentioned by a few people much smarter than I mention before my first reply above), why wouldn't you?
[jQuery] Re: onbeforeunload
Why not just use the working javascript method of doing so? and if you are new to the event, it's a very tricky-to-implement event with little to no customization of what you can do with it
[jQuery] Re: help with a strategy?
I've been coding a lot of data table stuff recently and i have been following the pattern of what the plugin inGrid does: which is have an empty table like: table id=Replace_Table thead tr thData Column/th thUse in Email Body/th thTest Value/th /tr /thead tbody/tbody /table And using the $.getJSON method, i call my server side script (in my case, ASP.NET, but that's irrelevant) and return a user defined class converted to JSON this object has 3 properties - (.HasError) First is a boolean whether the call was successful or not (after running business rules, etc) - (.Message) Second is a string message if needed - (.Data) A generic object that could be whatever one desires, in the case of the data table stuff, it'll be the html of the tr's and a pager row if needed So the code to call it would be like $.getJSON( SomeHandler.ashx, { Mode: TableData }, function(json) { if (json.HasError) { alert(json.Message); } else { $(#Replace_Table tbody).html(json.Data); } } ); Not saying this is the best overall way, but it surely has been working fine for me, and it keeps my JavaScript free of html :-)
[jQuery] Re: Using jQuery without ready()
A good trick for that is to hide the content you are manipulating, and then for the last line of the Ready() event, do a .show() and now the only thing the user will see is styled and complete elements I think what people are trying to get through to you, and i wholeheartedly agree, is that it wouldn't necessarily be best practice to do what you point out in your first post, and if you are learning to use jQuery, why not do so in the way it was designed and used most widespread On Mar 4, 4:19 pm, fetis [EMAIL PROTECTED] wrote: I guess the question is: what are you trying to gain by NOT wrapping it in document.ready? I'm using jQuery for styling some elements, like first menu item, selected item etc. When I run script right after this items it look like they already have such style. When I move script in ready event then element loaded and only after style is applied. It's visible. That is my problem.
[jQuery] Re: Fade font color
What are you trying to fade from what to what? Like is the before and after colors both visible? (like for instance blue text on a white background to red text on a white background?) If that's the case, running some sort of counter from one hex value to the other would be the way to go
[jQuery] Re: How to animate remove() and html() ?
Well, just throwing this out but to remove the html of a div and animate it, you could say like: $(dv).fadeOut(slow).html();
[jQuery] Re: How to know if the entire page has loaded, AFTER it has loaded? [advanced]
Why not just set a globally available flag? script type=text/javascript var _PageIsLoaded = false; $(window).load(function(){ _PageIsLoaded = true; ); /script Now _PageIsLoaded will tell you if the page is loaded or not
[jQuery] Turning an object into simple string
I've got an object in my javascript that keeps tracks of controls and their values and am trying to pass it to the server to use with James Network-King's excellent ASP.NET Json object So it allows me to pass a JSON-d object to it and i can manipulate it it in my VB code Problem i am having is turning my object: var PageData = [ { Tab: Recipients, Objects: [Recipients_Choice,U_RoleList,U_Select], Values: [,,], Valid: false }, { Tab: Body, Objects: [Subject_Text,BodyHtml_Text,BodyText_Text], Values: [,,], Valid: false }, { Tab: Schedule, Objects: [Schedule_Start,Schedule_End,Schedule_Frequency], Values: [,,], Valid: false } ]; into a simple string to my use of the getJSON method $.getJSON( modules/Schedule.ashx, { Mode: Save, Description: Description, Data: *** The PageData object as string here }, function(json) { if (json.HasError) { alert(json.Message); } else { // Code for success here with json.Data } } ); I am using this code i found (http://www.thomasfrank.se/ json_stringify_revisited.html), but when my script hits the line: JsonString = JSON.stringify(PageData); (and then in the getJSON call have Data: JsonString in the parameters Which works but the browser hangs for like 3 seconds (and it's not even that big of an object as you can see) Anyone have any suggestions to stringify an object using alternative methods (jQuery or even not)?
[jQuery] Re: datepicker
For the first: As long as you do not explicitly set the maxDate option (http:// docs.jquery.com/UI/Datepicker/datepicker#options), there isn't any problem selecting dates in the future For the second: I'm no expert on the datepicker and all it's inner workings and that, but if i had to do what you request and had to have it done fast, i'd tie into the onSelect method, use javascript's .getDay() method to see if it's 0 (for Sunday) or 3 (Weds) and if it's not, clear out the value of the textbox On Mar 7, 2:28 pm, Ahmad [EMAIL PROTECTED] wrote: Hello, Is there a way to make the datepicker select future dates? Is there a way to make the datepicker select specific days (ex. Sundays and Wednesdays only) ? Thanks
[jQuery] Re: basic Show Hide icon
What I would like to do though is to have a hand (or some other meaningful icon) show up on mouse over instead of the cursor. Is there a way to do this? Drop the a tags and just use CSS: cursor: pointer http://www.w3schools.com/css/pr_class_cursor.asp
[jQuery] Re: async validation
Maybe it's just me, but async validation makes absolutely no sense. you don't want your process to continue unless the data is valid Say you do kick off the validating of your fields in that manor, what are you going to do right after you kick off the process? On Mar 27, 12:36 pm, Brian J. Cardiff [EMAIL PROTECTED] wrote: Is it possible to perform validation in asynchronously? I would need this in remote validations that took a while. Thanks -- Brian J. Cardiff bcardiff(?)gmail.com .
[jQuery] Re: Anyone willing to take a look and see why this is happening?
What others... the page seems to work just fine (FF 2.0) To note: firebug reports a 404 error for http://c21ar.wsm-dev.com/cfm/ images/loading.gif On Mar 27, 9:45 pm, Rick Faircloth [EMAIL PROTECTED] wrote: Hi, all... Got some strange sliding going on. Here's the link: http://c21ar.wsm-dev.com/cfm/our-agents.cfm Click on the Click here to view or hide agent's biography link. The top bio slides and hides nicely. The others are just spastic. The jQ controlling this is: script type=text/javascript $(document).ready(function() { $('div.bio-slide').find('div.biography').hide().end(); $('a.showbio').each(function(i) { var $match = $('div.biography').eq(i); $(this).toggle(function() { $match.slideDown('slow'); }, function () { $match.slideUp('slow'); } ); }); }); /script Ideas? Thanks, Rick
[jQuery] Re: async validation
That more detailed reply makes much more sense If i was doing something like this, i'd have a little dictionary going on like var Validations = {}; Validations.Name = false; Validations.UserName = false; Validations.Email= false; Validations.SomeOtherField = false; and figure out at what point (keypress or blur or i suppose some sort of timer) to fire off the validation, and if you come back from the ASync call valid, then set the property in the above object as true And when submitting, only submit if all are set to true, otherwise tell the user what's going on
[jQuery] Re: New to jqModal... couple questions
see no mention of using forms inside of the jqModal window? What's to mention? There is nothing special about a form inside the div that would make up the modal window's content, it'd be just like anything else on the page
[jQuery] Re: ready and jquery 1.2.3
Why wouldn't you just start mydiv off as hidden (style= display: none)?
[jQuery] Had to add a few lines to 1.2.3 core file (fix IE7 and invalid argument for .attr method)
I can't seem to find any talk/reference on this exact error, but in the jQuery core file at line 1298 (inside the attr function) the line elem[ name ] = value; was throwing an error in IE7, preventing some other script-related things from working Using both Visual Studio 2008 (to debug IE) and Firebug (to follow along what was happening in FF) turns out NaN and NaNpx were respectively being passed into this function from two plugins i am using (ui.datepicker and clickmenu) Saw that value come through in FF, and the browser just ignored it but when that value came down in IE7, its much worse as it throws a script error in the case of trying to close the Datepicker, this error prevented that close action from taking place, in the case of the menu, it was able to get by it and still work (but still presented the yellow alert in the bottom left of IE) Anyways, i added a few lines to the core, so that it is now like: var FixedValue = + value; if (FixedValue.length = 3 FixedValue.substr(0,3) == NaN) { value = ; } if ( value != undefined ) elem[ name ] = value; return elem[ name ]; And now my menu works without throwing the error and, more importantly, the DatePicker closes properly I guess my questions to the group are: 1) Has anyone seen this error from either of these plugins in IE7? 2) Think my 'fix' is low impact enough that I shouldn't worry about other things getting affected? btw, even this super stripped down page displays the error here on IE7 html xmlns=http://www.w3.org/1999/xhtml; head titleDate Pick/title script src=../ScriptLibrary/jQuery/1.2.3/jquery.js type=text/ javascript/script link href=../ScriptLibrary/jQuery/plugins/ui.datepicker.css rel=stylesheet type=text/css / script src=../ScriptLibrary/jQuery/plugins/ui.datepicker.js type=text/javascript/script script type=text/javascript $(document).ready(function() { $(.Date).datepicker(); }); /script /head body divinput type=text class=Date //div /body /html
[jQuery] Re: Browsers incompatibility
Might help others help you if you give a snippet of the code that doesn't work
[jQuery] Re: Anyone Know of Good String Library?
I know you are looking for a whole library and all, which i could not answer, but i do have a common.js file i use where i pieced together *some* utility functions in js function Left(str, n){ if (n = 0) { return ''; } else if (n String(str).length) { return str; } else { return String(str).substring(0,n); } } function Right(str, n){ if (n = 0) { return ''; } else if (n String(str).length) { return str; } else { var iLen = String(str).length; return String(str).substring(iLen, iLen - n); } } function StartsWith(str, mtch) { var lft = new Left(str, mtch.length); return (lft == mtch); } function EndsWith(str, mtch) { var rght = new Right(str, mtch.length); return (rght == mtch); } function ValidDate(input) { var validformat = /^\d{1,2}\/\d{1,2}\/\d{4}$/; if (!validformat.test(input)) { return false; } else { var monthfield = input.split(/)[0]; var dayfield = input.split(/)[1]; var yearfield = input.split(/)[2]; var dayobj = new Date(yearfield, monthfield-1, dayfield); if ((dayobj.getMonth()+1!=monthfield)||(dayobj.getDate()! =dayfield)||(dayobj.getFullYear()!=yearfield)) { return false; } else { return true; } } } function EscapeHtml(txt) { var div = document.createElement(div); var text = document.createTextNode(txt); div.appendChild(text); return div.innerHTML; } Hope that helps, even if just a little
[jQuery] Re: What do you use?
ASP.NET 2.0 here, along with a few helpful add ons to help me with jQuery: - Wilco Bauwer's ID Override (http://www.wilcob.com/Wilco/Toolbox/ WilcoWeb.aspx) which keeps MasterPages and UserControls from messing with the control IDs and - Jason Newton's Json.NET library (http://james.newtonking.com/ projects/json-net.aspx) Both (and Visual Studio's 2008 Intellisense support for jQuery) make programming life a breeze in my day to day work
[jQuery] Re: jQuery AJAX Autocomplete with ASP .NET
Use a generic handler (ashx file) to spit out the needed list as plain text On May 6, 5:33 am, Lokesh [EMAIL PROTECTED] wrote: Hi, How can I use jQuery AJAX Autocomplete script to call my AJAX method from ASP .NET instead of php.
[jQuery] Re: New Plugin: Magnify
That is a way cool plugin, very nice work i look forward to getting to implement it on this site i am working on
[jQuery] Re: what's new in jquery 1.2.6
I just noticed that the page is now indeed updated Looks like lots of good fixes in there
[jQuery] Re: Can the JQuery file be included in another JavaScript file?
I have included the jquery and other scripts in this file to simplify code mangement How is that simplifying management? If a new release comes out (of either jQuery or any plugins you are using), surely it's obvious that it's easier to replace the single file in question than go into this big js file you are creating and surgically make changes.you aren't gaining anything with your merging process On Jun 8, 4:06 pm, Jason [EMAIL PROTECTED] wrote: Hi Mike, Basically, I have a global javascript file called globalutilities.js. I have included the jquery and other scripts in this file to simplify code mangement. When I include jquery file this way, I get errors with $ function. When I include it directly in the html file it works. I have tried including with relative and absolute paths in globalutities.js, but with no success. Note, I have functions in globalutilities.js that call functions from jquery. On Jun 8, 12:13 pm, Michael Geary [EMAIL PROTECTED] wrote: That's not quite enough information to tell what went wrong. :-) You can certainly concatenate several .js files into one, if that's what you mean. Can you post a link to a test page? -Mike I have been trying to consolidate a good number of scripts into include to simplify mgt. The trouble is when I include the jquery file it does not recognize the jquery functions. If I include it directly in the html page all works fine. I have even included remote files that I have confirmed are correct urls. Has anyone run into this issue?- Hide quoted text - - Show quoted text -
[jQuery] Re: anti IE6
Any many huge corporations and govt branches are slow to update as well it's certainly not their fault, so why would you purposefully annoy them?
[jQuery] Re: ASP.NET UserControl and jQuery
If you want to just make life easy, include jQuery in your layout/ masterpage and call it a day... it's only going to get downloaded once ( 30k if you use the packed version) and cached on the user's browser whenever the first page is loaded, so it's not like it's downloaded again and again on all page loads Otherwise to load javascript from within a user control, WebResource will do the trick http://weblogs.asp.net/dwahlin/archive/2007/04/29/creating-custom-asp-net-server-controls-with-embedded-javascript.aspx As for checking for already loaded, Google-ing check if jquery is loaded shows this simple if statement: http://groups.google.com/group/jquery-en/browse_thread/thread/c155ed907e3d479d
[jQuery] Re: 1 item remaining hang up with document.ready
Have you fired up a tool like Fiddler (http://www.getfiddler.com) to see what particular item it is hanging on?
[jQuery] Re: changing value of hidden input
Why not just simply use document.getElementById? (which ultimately .val() uses anyways)
[jQuery] Re: bugs
Might want to put all that in the same $(document).ready() block so the code all runs in the order you want it..
[jQuery] Re: OT: any idea how to know what firefox is currently loading ?
tell me more about the Firefox Net Tab See http://www.getfirebug.com
[jQuery] Re: jqModal r12 release
Brice: Thanks a lot for all the hard work, your plugin is one of the most used ones in my applications Glad to see it playing nicely with the new jQuery version
[jQuery] Re: Problem with Selecting Multiple Elements
How about $([EMAIL PROTECTED]).each(function() { var link = $(this).attr(href); $(this).tooltip({ bodyHandler: fetchLink(link) }); }); if that doesn't work, show some of the HTML of the hyperlinks and what you'd like the end result to be
[jQuery] Re: How can I downlod that jQuery Ipod Drilldown menu?
Some one can help me please? Why not use the Contact Us link on the top right and ask them?
[jQuery] Re: Detecting the selected option
this.value not get the value of a select use if ($(this).val() == 'no') instead or you can just use what jQuery does under the hood and say if (this.options[this.selectedIndex].value == 'no') On Jun 25, 11:13 am, Will [EMAIL PROTECTED] wrote: I have a button (#showgraph) that submits a form, but when this happens, I want a certain div (#overlaybutt) to appear only if a certain value ('no') is present in one of the select options (#initCond). Here's what I have so far, which isn't working: $(#showgraph).click(function(){ // Only unhide the Overlay controls if Initial Conditions are set to No. $(#initCond).change(function() { if (this.value == 'no') { $(#overlaybutt).show(slow); } return false; }); return false; }); How would I show #overlaybutt only if the value of the #initCond select box is set to 'no'? Thanks!
[jQuery] Re: required jquery version
Right from the changelog (http://jquery.bassistance.de/autocomplete/ changelog.txt): * Updated package to jQuery 1.2.5, removing dimensions older versions (not exactly sure how old though) didn't have the dimensions built in
[jQuery] Re: Validating disabled inputs
Use readonly instead of disabled See: http://www.htmlcodetutorial.com/forms/_INPUT_DISABLED.html
[jQuery] Re: getJSON callback bug
You are missing commas in between your inner {}'s for instance, your JSON is this (and this is just the first two records) { 275: { tags: , name: 1st Wickham Scout Group, code: 1stWickhamScoutGroup } 1: { tags: , name: ?, code: devtest123 } } it should be { 275: { tags: , name: 1st Wickham Scout Group, code: 1stWickhamScoutGroup }, 1: { tags: , name: ?, code: devtest123 } } I found this easily using the excellent program JSON Viewer (http:// www.codeplex.com/JsonViewer)
[jQuery] Re: Firefox/css/jquery..
I just noticed that firefox dosen't support the z-index Of course FF supports z-index... something is wrong with your code/markup, not with FireFox or jQuery Got a live link to show what you cannot get working?
[jQuery] Re: text input glow effect
Doesn't look very easy (yet anyways), but there's plenty of options http://www.google.com/search?q=css+cross+browser+glow jQuery could help apply the styles and like
[jQuery] Re: jQuery issues in Firefox 3
The problem, as far as I can tell, stems from what appears to be an early execution of the document.ready function - in this case before an external stylesheet has been loaded document.ready fires when the DOM is loaded, it doesn't wait for external things to load, that's the whole point! :-) If so, is there a call I can use instead of document.ready to trigger the code once the CSS has loaded? $(window).load(function() { // your code to run after the whole page, external things and all, have loaded }); On Jun 21, 5:17 am, David Webster [EMAIL PROTECTED] wrote: Hi all, I'm having a few issues using jQuery in Firefox 3 and was wondering if anyone else has had similar problems. The problem, as far as I can tell, stems from what appears to be an early execution of the document.ready function - in this case before an external stylesheet has been loaded - making width(), height() and any css() method unpredictable. I've put together a test case here:http://dev.cognite.net/sandbox/jquery.html That's basically a wrapper that contains two iframes, both with exactly the same code, one with an embedded css and one with external css. The results I'm getting are that the two iframes report different values for the height, width and colour of elements, but only under Firefox 3. This is an intermittent problem - sometimes it doesn't show up, but most of the time it does, on both Mac and PC. Is this the correct behaviour? If so, is there a call I can use instead of document.ready to trigger the code once the CSS has loaded? If this is a bug, has it been reported already and is there a known work around - my googling hasn't thrown up anything on this topic. Thanks, David. -- Kayak Travel:http://www.travellingkayak.com
[jQuery] Re: Running a loop for array numbers
$('.equipment a.i-right1:eq(1)').hide(); $('.equipment a.i-right1:eq(2)').hide(); $('.equipment a.i-right1:eq(3)').hide(); $('.equipment a.i-right1:eq(4)').hide(); $('.equipment a.i-right1:eq(5)').hide(); $('.equipment a.i-right1:eq(6)').hide(); $('.equipment a.i-right1:eq(7)').hide(); $('.equipment a.i-right1:eq(8)').hide(); Could be: $('.equipment a.i-right1:lt(9)').hide();
[jQuery] Re: Running script onLoad instead of ready
Just to note on: I was trying to get an alert to fire after some of the page loads, (but before ().ready) 'load' is always going to fire *after* 'ready'
[jQuery] Re: Yahoo Mail-like Select All check box (???)
This should clear out the Select All whenever one of the checkboxes is clicked/changed $(':checkbox').change(function() { document.getElementById('selectAll').checked = false; });
[jQuery] Re: AutoComplete and JSon not working as expected. Please, help me out.
That strange format *is* JSON !
[jQuery] Re: jqmodal close on javascript event
Yes, it's possible it would be like function SomeEventYouCallOnRowDoubleClick() { $(#ID_of_JQM_Window).jqmHide(); }
[jQuery] Re: Display JSon String
A tool like Firebug will let you view the Response Body of an XHR request, which includes seeing the JSON as a plain string
[jQuery] Re: Problem if AJAX returns JSON with colon (:)
I took that JSON and plugged it right into JSONViewer (http:// www.codeplex.com/JsonViewer) and no problems with it i'd say something else is causing the screw up, because it's apparently not jQuery or the JSON
[jQuery] .width() gives me NaN (or looking for alt methods)
All right, here's my situation I have a bunch of articles stored in my database, plain jane HTML ones submitted by a few hundred different people (read: people of all varying levels of HTML expertise, from none to expert) In some of these HTML snippets are div's and tables and other items that one way or another have a width specified (via CSS, inline style, or width parameters) What i need to do is take these snippets of HTML and somehow restrict the width of these items to the size of the 'viewport' of the page (i am making an iPhone friendly version of the site) Now if the width's were defined in a consistent manner, then i would just search and replace on the server when i pull the HTML from the database, but there's so many different variations that doing this isn't realistic is there some way that jQuery could be of help here? i've already taken a run at this using LiveQuery and saying: jQuery(document).ready(function() { jQuery(div).livequery(function() { console.log('Div: ', jQuery(this).width()); }); }); just to see if i could at least see all div's that need action taken against them, but all i get from that is NaN even if i could get the div's i need, i am not sure what i could do to skinny them up anyways So i am open for suggestions... oh, to see an example of this: http://iphone.team-integra.net (no worries pulling it up in Firefox or whatever), then click Articles, then Newest 8, and the first one will show what i mean... the article text is wrapped in div style=width: 600px;/div and that's inside a Viewport that's only 320 px wide Again, changing the text in the article isn't an option, there's simply way too many ways over these 7+ years of articles that width has been set Thanks in advance
[jQuery] Re: UI Sortable
Maybe post your code or a link to the page so others can see
[jQuery] Re: How can I downlod that jQuery Ipod Drilldown menu?
If you go to their demo page: http://www.filamentgroup.com/examples/menusHierarchical/ you can grab all the needed files (which appears to be 3 js and a css file) using Firefox and firebug
[jQuery] Re: calculate width of images in specific div
var TotalWidth = 0; $(#id_of_div img).each(function() { TotalWidth = TotalWidth + $(this).width(); }); On Aug 20, 7:56 am, ToM [EMAIL PROTECTED] wrote: Hi, is there a way to calculate the width of all images in a specific div.? the images do have the width-attribute! ToM
[jQuery] Re: any jQuery plugin like this?
Well, the dropdown part is just cascading dropdowns, there's a ton of jQuery variations of that The second is simply an autocomplete textbox (http:// plugins.jquery.com/project/autocompletex)
[jQuery] Re: tablesorter plugin will not sort dynamically generated table from jquery load(script.php)
Wire up the Tablesorter code *after* the table is on the page $(document).ready(function(){ $(#menuitem).click(function(event){ $(#outputdiv).load(script.php); $(#outputdiv table).tablesorter(); }); });
[jQuery] Re: autocomplete plugin incompatible with jquery.ui ?
fixes the problem. Other than doesn't work, what is the problem (what does firebug tell you?)
[jQuery] Re: autocomplete plugin incompatible with jquery.ui ?
Hmmm i got this to work just fine... perhaps differences in ui.js (as you can see, mine is right off the official site) ? !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 titleAutocomplete and jQuery UI Test/title script src=http://ui.jquery.com/js/jquery.js; type=text/ javascript/script script src=http://jquery.bassistance.de/autocomplete/lib/ jquery.bgiframe.min.js type=text/javascript/script link href=http://jquery.bassistance.de/autocomplete/ jquery.autocomplete.css rel=stylesheet type=text/css / script src=http://jquery.bassistance.de/autocomplete/ jquery.autocomplete.js type=text/javascript/script script src=http://ui.jquery.com/js/ui.js; type=text/ javascript/script script type=text/javascript $(document).ready(function() { var data = Steve Roger Adam John.split( ); $(#autofield).autocomplete(data); }) /script /head body form input type=text id=autofield name=autofield / /form /body /html
[jQuery] Re: autocomplete plugin incompatible with jquery.ui ?
Maybe get the dev version and pack it yourself (http:// dean.edwards.name/packer/) would be worth a shot
[jQuery] Re: Swapping table rows
I don't have time to work up an example, but what you want to do would/ could involve: .clone http://docs.jquery.com/Manipulation/clone#true and .remove http://docs.jquery.com/Manipulation/remove#expr
[jQuery] Re: JQuery exists - anything in core or a plugin that does this?
a quick plugin to do a simple if statement? if ($(img).length 0) { $(img).doSomething(); }
[jQuery] Re: Adding Values (Sum) of TD.
It's definitely *possible* but it would be highly suggested to make this total row on the server's side if you are dead intent on doing it client side, it would be something like $(#table tbody tr).each(function() { // Your code adding the inner text values of the needed table cells });
[jQuery] Re: My site asks for a pswd if JQuery is activated
What's going on? If it's a Windows-type login you are getting hit with , then your script, the actual js file, doesn't have proper permissions given to the IIS user
[jQuery] Re: A better way to do this?
.find() should help $(this).find(ul li a).each( )
[jQuery] Re: Quick Selector Question...
$(input[id$='date'])
[jQuery] Re: Quick Selector Question...
actually, more precise would be: $(input[type='text][id$='date']) and this is right off the jQuery documentation here: http://docs.jquery.com/Selectors/attributeEndsWith#attributevalue and here: http://docs.jquery.com/Selectors/attributeMultiple#attributeFilter1attributeFilter2attributeFilterN
[jQuery] Re: Release: Tooltip Plugin 1.3
I was just messing around with this plugin yesterday, and i love it! http://i38.tinypic.com/30deagg.jpg (screenshot of me using it) Only thing i couldn't figure out was how to *not* generate h3 headers/tag... my work around was setting: #tooltip h3 { display: none; } and my titles had to be like this: a href=somelink.aspx title= - Tooltip HTML herelink/a
[jQuery] Re: Release: Tooltip Plugin 1.3
I don't really follow on the bodyHandler option for instance, there are my links: a href=someurl1.aspx class=PN_Link title=I am a tooltip for link1br /See me tooltipLink 1/a a href=someurl2.aspx class=PN_Link title=I am a tooltip for link2br /See me tooltipLink 2/a and to wire it up have: $(.PN_Link).tooltip({ track: true, delay: 0, showURL: false, opacity: 1, fixPNG: true, extraClass: pretty fancy, top: 5, left: 5, bodyHandler: function() { return $(this).attr(title); } }); and the tooltip is empty what should be in the function there?