[jQuery] Re: Classis ASP integrating Async Treeview Plugin using getJSON. Stops working when using response.write [variable name] instead of simple JSON string
I'd try: Response.ContentType = application/json right before the first writing On Jan 28, 2:32 pm, Jason Knight jason.t.kni...@gmail.com wrote: Hi all, I've loved using jQuery these past few months, but I'm really pulling my hair our here. The following is the endpoint asp code that gets called to populate my treeview: % rootid = request.querystring(rootid) json = set Conn = server.CreateObject(ADODB.Connection) Conn.Open strProvider if rootid = source then json = [ set RS = Server.CreateObject(ADODB.RecordSet) Sql = select categoryid,categoryname,(select count(*) from tblcategories where parentid = c1.categoryid) ChildCount from tblcategories c1 where parentid = 0 session(errorsql) = sql set Cmd = Server.CreateObject(ADODB.Command) Cmd.CommandText = Sql Cmd.ActiveConnection = Conn rs.open Cmd if not RS.EOF then GotRows = y arrResultSet = RS.GetRows() numRows = ubound(arrResultSet,2) For i = 0 to numRows categoryid = arrResultSet(0,i) categoryname = arrResultSet(1,i) childcount = cint(arrResultSet(2,i)) json = json {'text': ' categoryname ','id':' categoryid ' if childcount 0 then json = json , 'hasChildren':true end if json = json } if i numRows then json = json , end if Next else GotRows = n json = json {'text': 'No Categories have been created'} end if json = json ] RS.close elseif isnumeric(rootid) and rootid then json = [ set RS = Server.CreateObject(ADODB.RecordSet) Sql = select categoryid,categoryname,(select count(*) from tblcategories where parentid = c1.categoryid) ChildCount from tblcategories c1 where parentid = ? session(errorsql) = sql set Cmd = Server.CreateObject(ADODB.Command) Cmd.Parameters.Append CreateIntParameter(Cmd, rootid, rootid) Cmd.CommandText = Sql Cmd.ActiveConnection = Conn rs.open Cmd if not RS.EOF then GotRows = y arrResultSet = RS.GetRows() numRows = ubound(arrResultSet,2) For i = 0 to numRows categoryid = arrResultSet(0,i) categoryname = arrResultSet(1,i) childcount = cint(arrResultSet(2,i)) json = json {'text': ' categoryname ','id':' categoryid ' if childcount 0 then json = json , 'hasChildren':true end if json = json } if i numRows then json = json , end if Next else GotRows = n end if json = json ] RS.close end if set Cmd = nothing set RS=nothing conn.close set conn=nothing response.write json % This code produces the following JSON string viewable when I hit the page directly with the ?rootid=source parameter: [{'text': 'Cat1.0','id':'1'},{'text': 'Cat1.1','id':'2', 'hasChildren':true},{'text': 'Cat1.2','id':'3'}] Unless I've received a severe blow to the head, I recognize this as valid JSON and just what the treeview needs to produce a flat display of 3 nodes with the second having a '+' sign for expandability. Here's the frustrating part, when I past that string into the body of my asp page, comment out the response.write line, save, and run everything I get the simple tree that I'd expect. When I remove the JSON string, and uncomment the response.write line, nothing happens. I've tried flushing the response object, ending the response object, clearing the response before writing to it, yet nothing seems to work. Please, please help!
[jQuery] Re: Append Variable to Select box
on issue you have is in one place you seem to have a variable names fresizeSizeNOPX then later on you have $(#px).val(fresizeSizeNOPX); which is a string value, not the value of the variable you used earler second issue, or confusion, what do you think or want this to be in the selector: $(this).bind('click', function(event, ui) { On Jan 26, 6:10 am, Mircea i...@amsterdamsat.com wrote: I have the following function that should append or prepend a dynamic value to a select with id #px. The dynamic value is not in the select DOM from the start so I have to append it to make it work. The problem is that the new created value is not shown until I click on the select dropdown, the DOM does not generate that value until I click and drop down the list. What should I do? This is my code: $(document).ready(function() { $(this).bind('click', function(event, ui) { var fresizeSize = $('.cica').css(font-size); var fresizeSizeNOPX = $('.cica').css(font-size).replace(/[^0-9]+/ g,''); var newTr = 'option class=option value=' + fresizeSize + ' label=' + fresizeSizeNOPX +'' + fresizeSizeNOPX +'/option'; $('#px').prepend(newTr); $(#px).val(fresizeSizeNOPX); }); }); Thank you.
[jQuery] Re: jQuery now integrated into Visual WebGui web/cloud platform
What a poor marketing-oriented post... First off, you seem to make the assumption that anyone using MS's tool is knee deep in session management and security. *they're not*, as the baked in Profile, Roles, and Membership objects all take care of that, and once they are setup, a single line in the configuration can protect a file, folder, the whole app. using the last two versions of studio is like developing DESKTOP applications, but for the web, so I'm not sure what that line of marketing-speak is supposed to make your product look any better. On Jan 25, 2:47 pm, visualwebgui navot.pe...@visualwebgui.com wrote: That is a very good question, thank you for asking. I am not objective nor do I pretend to be. I am one of the creators of Visual WebGui. What we had in mind is not creating a visual programming that MS offers, but simplifying a complex multi languages and methodologies process. With Visual WebGui you develop like you develop DESKTOP application. Fully object oriented, you do not have to bother with session management nor do you have to deal with the response and request or Ajax call or security. It is all handled for you by the framework itself. But why believe me, there are tens of thousands developers that already use VWG, some of their experience can be viewed HERE On Jan 25, 2:19 pm, MISS_DUKE siva...@gmail.com wrote: Microsoft is providing a proper visual environment, then WHY should we need this Visual WebGui??!! On Jan 25, 2:57 am, NCSM chaba...@gmail.com wrote: Gizmox, the developer of Visual WebGui web/cloud applications platform announced the release of its Visual WebGui 6.4 beta 1 version, with expanded capabilities that include the integration of the jQuery library for faster behavior customization and user interface extension. This enables developers to create Web 2.0 user interfaces (UI) in a more expedited and easier manner. In addition, the integration allows jQuery developers to offer a path empowering the jQuery based UI, while maintaining the Visual WebGui server power and security which are vital for data secured – sensitive applications. With the original VB6 like drag and drop development practices that earned Visual WebGui its popularity as an open source enterprise .Net Ajax platform, the new version lends its simple VB6 like web development empowerment to jQuery developers. In addition, Visual WebGui developers will be able to develop applications using full object oriented environment by utilizing the power of the server and at the same time to write extensions using one of the most popular client side frameworks. After a year of getting feedback from users of our free open source versions, we’re testing the waters with this first fully featured commercial beta version, which will enhance functionality by offering users enhanced features, better documentation, performance and better UI customization,” said Navot Peled, CEO of Gizmox, the parent company of Visual WebGui. “And more importantly, we’re fully confident that developers will utilize the integration of jQuery in our solution to reduce Java Script customization headaches.” The new 6.4 beta 1 version had also gone through intensive infrastructure optimization in order to enhance Visual WebGui’s performance, interactivity and scalability to serve multi simulations users. This version is the first fully featured Visual WebGui version, which is going to go live as the first fully featured commercial version. 6.4 beta downloads are available atwww.visualwebgui.com-Hide quoted text - - Show quoted text -
[jQuery] Re: Internet Explorer line 1 char 1 code 0
Typically bad HTML leads to that take your URL or the view source text and run it through an HTML Validator On Jan 25, 9:35 am, Toktik toktik...@gmail.com wrote: I'm using jQuery+drupal and some jQuery plugins. All is ok with Firefox. But in IE's i'm receiving problem like this. Line: 1 Char: 1 Error: object expected URL:http://businessway.am I have included .js files. How to know where is the problem? In which file? Line 1? Which file? If you can please check with this address:http://businessway.am
[jQuery] Re: Internet Explorer line 1 char 1 code 0
No error which can call this type error. I do not have any clue what that is suppose to mean.. sorry
[jQuery] Re: how to get href value
or how it's slower say there's 100 a on the page (which wouldn't be too uncommon for say, a blog site), that's 100 event's wired up sitting in ready to go... using event delegation, one single event is wired up and if a user clicks somewhere (and really, how much clicking does a web page actually get?), it does a single if statement asking was this a link? On Jan 23, 10:52 am, Amos King amos.l.k...@gmail.com wrote: Greg, I'm not sure how your's is much diffrent then the original. On Sat, Jan 23, 2010 at 7:04 AM, Greg Tarnoff greg.tarn...@gmail.comwrote: Actually all of these are slow. The last example will run anytime you click the page. You only want to run this if they click an A element. So attach a click event to A. Try this: $(document).ready(function(){ $('a').click(function(){ alert($(this).attr('href');); }); }); only do the e.preventDefault(); if you don't want it to go somewhere. I use this method all the time to get the HREF, always putting it into a variable, and affect the page. Usually for things like sliding panels. By putting in #myid it remains accessible when JS isnturned off. On Jan 23, 4:30 am, Andrei Eftimie k3liu...@gmail.com wrote: $(document).ready(function() { $(a).click(function(event) { alert( You clicked a link to + this.href ); return false; }); }); This method is very slow. Try using event delegation: $(document).ready(function() { $(document).click(function(event){ if ($(event.target).is('a') { alert( You clicked a link to + event.target.href); return false; } }); }); -- Andrei Eftimiehttp://eftimie.com+40758 833 281 Puncthttp://designpunct.ro -- Amos Kinghttp://dirtyInformation.comhttp://github.com/Adkron -- Looking for something to do? Visithttp://ImThere.com
[jQuery] Re: how to get href value
but I haven't had much luck getting .html.href to work in the past. nor should you have *any* luck, since that is totally bad syntax
[jQuery] Re: UI slider execute function on change or slide
I am using the ARIA Slider from that would have been fantastic to have known *from the beginning*, I thought you were using jQuery UI Slider, hence my reply 3 posts ago with a link to the example, which explains now why you didn't read, or seemingly even looked at... whatever though, good luck fixing your issue On Jan 21, 6:14 pm, Mircea i...@amsterdamsat.com wrote: I am using the ARIA Slider fromhttp://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_selec... I will change the values to 10, 20, 30, 40... When an user selects a value with the slider the font-size will increase or decrease accordingly. I managed to get the current selection of the slider in a variable, I want now to pass it to a CSS function: My variable is: var setfontsize = $('#sizer :selected').text(); the css function is $('.cica').css(font-size, setfontsize + px); In the original ARIA Slider I had changed #speed with #sizer. Thanx for your help!
[jQuery] Re: New Forums
To add to Richard's list * Ability to post code without having Google Groups code f_ck it up* I'm not sure why people are voting and all that, it's done, it's decided, it's time to get with the program Besides, as Richard pointed out, the mailing list right here will still exist, it just won't be moderated/managed by the people it was before.. and Karl put it best: they can't please everyone. there's a LOT of topics from over the past two years on this very mailing list crying out for a forum instead of the mailing list. Damned if you do damned if you don't On Jan 22, 11:31 am, Richard D. Worth rdwo...@gmail.com wrote: On Fri, Jan 22, 2010 at 10:23 AM, Octavian Rasnita orasn...@gmail.comwrote: From: Karl Swedberg k...@englishrules.com On Jan 21, 2010, at 8:11 PM, brian wrote: FWIW, I'm pretty sure the decision to drop Google Groups is due to John Ressig's account being spoofed by spammers. No, that's not it. Okay, maybe it was one of the last straws, but we've been talking about moving to a forum for a couple years now. If you want to know what factors were involved in the decision, please read http://jquery14.com/day-07/new-jquery-forum/ I read that: Additionally, we wanted something that lowered the barrier to asking a question - something that anyone would be able to use Well, for some categories of users, the movement to a forum has done exactly the reverse, because a forum is much less accessible than a mailing list for screen reader users for example, but for other categories of users also. For example, if a user uses a good mail client, he or she could configure it so all the messages from the list to go to a specific folder, the messages that contain some words in the subjects or in the body to go to another special folder as they arrive, the messages are automaticly grouped by conversation, and they can easier be all saved locally or all deleted (or individually). And if a user has a good rss reader they can do the same with a forum. Also, using rss2email services, they could have the best of both worlds. The best solution from the perspective of the users would be to have a mailing list system that can also offer and present the messages on the web, but this would involve more work for JQuery developers, and it seems that this idea is the best, but there is nobody willing to help doing and administering it. So the JQuery developers have chosen to use a forum which is administered by somebody else. That's very OK, but I think at least the JQuery mailing lists should not be disabled, while there still are users that prefer using them. I don't know that they will be disabled, but if not they will be completely unmoderated. This means way more spam than before. In addition, many active contributors, including jQuery team members, have moved over to the forum, so there will be a lot less traffic on the mailing lists. People may still find help and answers, but it won't be the official forum. Just as before when the mailing list was the official forum, people found answers elsewhere. To be honest, I've never been a fan of forums, either. But after spending some time in the jQuery forum, I'm starting to appreciate its advantages over a plain mailing list. Can you please tell us which are those advantages? (in general, not only regarding JQuery forum.) *Tags* I tag and filter emails, and it's been really nice. But it's always bothered me that all the tagging and filtering I do has to be duplicated by everyone else consuming the same content. Using tags on the website forum, all this metadata can be shared. *Types* On the forum, there are 5 type of threads: Discussions, Questions, Ideas, Problems, and Announcements. These can be selected by the OP and corrected be a moderator, and searched and filtered on. Another piece of shared metadata. *Categories* Before we had 5 or 6 mailing lists for different sub-topics. Many times a day as a moderator, I would have to kindly ask someone to move a discussion to the correct forum, to keep noise down, to keep the list on-topic, and to ensure people saw the question and the answer in the right place, whether via email or web archive. This was not only a real pain, but it's not that much fun for anyone involved, especially new users that may not have a clue that there's more than one list, or which list to post to: jquery-en, jquery-dev, jquery-ui, jquery-ui-dev, jquery-a11y, etc. On the new website forum, not only is it easier to see which top-level forum topics are available for posting, but if something is posted in the wrong forum, a moderator can simply select 'Move this topic' and then select the correct sub-forum. That immediately reflects in any sorting, filtering, or categorization anyone does. Another piece of shared metadata. *Status* In addition to being able to tag, type, and categorize each thread,
[jQuery] Re: New Forums
On Jan 22, 4:13 pm, John Arrowwood jarro...@gmail.com wrote: Silly thought: What if the forums were 'published' to the mailing list, and the mailing list were made read-only? That is, every time a post is published on the forum, it is automatically sent to the mailing list. Then, in the footer of the message is a link to reply to the post, which when clicked takes you to the forum in such a way that the user can immediately reply to that post. I hate to point out the obvious, but isn't this is what an RSS feed accomplishes?... want an email instead of an RSS reader? http://www.feedblitz.com/f/f.fbz?RSSHome Guys, all you need to do is read this post http://jquery14.com/day-07 Reading that post above, it's dead obvious that the change is made, it's done... there isn't one ounce of indication in that post whatsoever that the mailing list even has the slightest of chances of being the primary source of official jQuery help, and judging by the huge text banner at the top of this list, won't even be a minor source of official help. Also taking into account that moving to a forum was announced as the plan at September's jQuery Conference, meaning it was -thought about- long before that I personally like the mailing list, and don't enjoy the Zoho forum in it's current state (forgets login info despite asking to remember and fixed width is so 2000), ... i've been active here for going on two years, and it's been a great source of getting help as well as doing my best to provide help... but its time to see that the Forum decision is made for better or worse I'll still spend some time and post on both as long as this mailing list has traffic (and hasn't been over ridden with spam), as it's only one quick bookmark away but we're in the minority, and we had no say. I'm not trying to be harsh or rude or anything the like, just trying to point out the obvious :-( No matter where help is to be had... here, the forums, stackoverflow, the IRC channel, this is still a fantastic library and it makes web programmer's lives easier day in and day out. who cares what is official and what isn't. no matter what the solution, there's no way on God's green earth that it is going to satisfy everyone. they've done what is best for them in the the interest of moving forward, and Google Groups does have it's issues, Zoho was the solution made. /off soapbox have a good/safe weekend - Steve
[jQuery] Re: class={title:'test'}
No, you don't have it right, it's the MetaData plugin in use :-) http://pupunzi.open-lab.com/mb-jquery-components/jquery-mb-extruder/ one of the dependencies listed is jquery.metaData.js On Jan 21, 3:46 pm, Bruno Santos bit...@gmail.com wrote: Hiho! I believe that you are trying to add some CSS settings directly on the tag definition, instead of assigning a class to it. If I got it right, you should use the tag parameter *style*, instead of class. div id=extruderLeft style={title:'test'} div class=content div class=voice {} logo /div div class=voice {panel:'... .php',data:''} ... /div /div /div 2010/1/20 fran23 f...@lavabit.com I don't know how to handle class={title:'test'} it's out of the mb.extruder plugin div id=extruderLeft class={title:'test'} div class=content div class=voice {} logo /div div class=voice {panel:'... .php',data:''} ... /div /div /div normally I assign a class (i.e. class=abc) and set abc via CSS .abc { ... } but I don't know what to do with class={title:'test'} May anybody give an explanation or link where I can learn about it? thx fran -- View this message in context: http://old.nabble.com/class%3D%22%7Btitle%3A%27test%27%7D-tp27238929s... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: UI slider execute function on change or slide
You have $('#sizer'). but no object with the id of size in your markup where is the slider at? On Jan 21, 4:20 pm, Mircea i...@amsterdamsat.com wrote: Hi, I want to make the UI slider to set a font-size to a .cica class. The setfontsize variable works but I can not succeed to make the slider change the value on slide. Here is the function $('#sizer').slider({ slide: function(event, ui) { var setfontsize = $('#sizer:selected').text(); $('.cica').css(font-size, setfontsize + px); } Here is the markup form action=# !-- Slider -- fieldset select name=speed id=speed option value=1010/option option value=1515/option option value=21 selected=selected21/option option value=3030/option option value=4040/option /select /fieldset /form Thank you.
[jQuery] Re: UI slider execute function on change or slide
you should look at the demos http://jqueryui.com/demos/slider/ the .slider() call is supposed to be on a div and in turn the events of that slider div set the value on your form field and even if select name=sizer id=speed is correct, then the jQuery selector of $(#slider) won't get that object On Jan 21, 4:48 pm, Mircea i...@amsterdamsat.com wrote: Oh, sorry is select name=sizer id=speed it is fieldset select name=sizer id=speed option value=1010/option option value=1515/option option value=21 selected=selected21/option option value=3030/option option value=4040/option /select /fieldset It was a typo, the code does not work with sizer or the speed typo.
[jQuery] Re: UI slider execute function on change or slide
Ick, no follow the example on the link above the slider gets attached to an *empty* div... you're applying it to a div that contains everything else that link above shows the right syntax, and definitely works follow that and you should be all straight On Jan 21, 5:20 pm, Mircea i...@amsterdamsat.com wrote: I've changed my markup to: div id=ariaslider form action=# !-- Slider -- fieldset select name=sizer id=speed option value=1010/option option value=2020/option option value=21 selected=selected21/option option value=3030/option option value=4040/option /select /fieldset /form /div and code to: script type=text/javascript $(function(){ //demo 1 var abc = $('select#sizer').selectToUISlider().next(); var setfontsize = $('#sizer :selected').text(); $('#ariaslider').slider({change: function(event, ui) { $('.cica').css(font-size, setfontsize + px);}}); $('#ariaslider').bind('slidechange', function(event, ui) { $('.cica').css(font-size, setfontsize + px); }); }); /script I am not quite sure of what it does, I am trying to get more info on how bind works... It now change the first size and then it blocks. Thank you for your help.
[jQuery] Re: UI slider execute function on change or slide
Also to note i don't think you can have values like you have in your select by changed by a slider... 10,20, 21, 30, 40 how is someone supposed to choose 21? if the slider increment was set for increments of 10, then 10, 20, 30 and 40 are taken care of if the slider is setup properly... but if you set the increment to 1 so you could go from 20 to 21, then you create major issues because you don't have values for 11, 12, 13, 32, 38, etc etc Take a step back: Exactly what are you trying to accomplish? You want your user to use the slider to: - select a value between 10 to 40? - select a value from the choices of 10, 20, 30, 40? - something else? On Jan 21, 5:20 pm, Mircea i...@amsterdamsat.com wrote: I've changed my markup to: div id=ariaslider form action=# !-- Slider -- fieldset select name=sizer id=speed option value=1010/option option value=2020/option option value=21 selected=selected21/option option value=3030/option option value=4040/option /select /fieldset /form /div and code to: script type=text/javascript $(function(){ //demo 1 var abc = $('select#sizer').selectToUISlider().next(); var setfontsize = $('#sizer :selected').text(); $('#ariaslider').slider({change: function(event, ui) { $('.cica').css(font-size, setfontsize + px);}}); $('#ariaslider').bind('slidechange', function(event, ui) { $('.cica').css(font-size, setfontsize + px); }); }); /script I am not quite sure of what it does, I am trying to get more info on how bind works... It now change the first size and then it blocks. Thank you for your help.
[jQuery] Re: class={title:'test'}
Here is the plugin http://plugins.jquery.com/project/metadata in your example of div id=extruderLeft class={title:'test'} var x = $(#extruderLeft).metadata().title; console.log(x); would show test in the Firebug console On Jan 20, 4:34 am, fran23 f...@lavabit.com wrote: I don't know how to handle class={title:'test'} it's out of the mb.extruder plugin div id=extruderLeft class={title:'test'} div class=content div class=voice {} logo /div div class=voice {panel:'... .php',data:''} ... /div /div /div normally I assign a class (i.e. class=abc) and set abc via CSS .abc { ... } but I don't know what to do with class={title:'test'} May anybody give an explanation or link where I can learn about it? thx fran -- View this message in context:http://old.nabble.com/class%3D%22%7Btitle%3A%27test%27%7D-tp27238929s... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Live function syntax
How should I use it right? there doesn't seem to be anything wrong with your syntax (with the .live part anyways, your usage of .val() has no impact on your issue) got more code to show? are you using at least the 1.3.2 version of the library? also take into account that id's on the page should be unique, your code is assuming/looking-for multiple objects with id family... that isn't 'good' practice... it may work yes, but as said, id's should be unique on the page On Jan 20, 7:12 am, Mircea i...@amsterdamsat.com wrote: Hi, I want to add a live event on a function. My function is: $(#family).click(function(){ $($(#tag).val()).css(font-family, $(#family).val()); }); I've tryed to add it like this: $(#family).live(click, function(){ $($(#tag).val()).css(font-family, $(#family).val()); }); but I get a $(#family).live is not a function FireBug error. How should I use it right? Thank you.
[jQuery] Re: Filtering a jQuery Object variable
http://docs.jquery.com/Traversing/filter#expr so Foo = Foo.filter(:visible); On Jan 20, 1:52 pm, BKahuna j...@twistedlogictechnology.com wrote: I've got a variable that holds a jQuery object. I would like to filter out all of the visible elements in that jQuery object. The problem is once I'm using a variable and not the jQuery object itself I don't know the semantics for filtering it. I have something like this: var Foo = $(#Bar); FilterFunction(Foo); function FilterFunction(Foo) { var Test = $(Foo + :visible); } What is the correct syntax? Thanks very much, BKahuna -- View this message in context:http://old.nabble.com/Filtering-a-jQuery-Object-variable-tp27246700s2... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: UNSUSCRIBE
You click on Edit my membership options on the right and then go to the email options No email On Jan 19, 6:27 am, Juan Ignacio Borda juanignaciobo...@gmail.com wrote: unsuscribe juanignacioborda.vcf 1KViewDownload
[jQuery] Re: new forums used?
As long as your questions/issues continue to get answered, it shouldn't matter where you post as there's plenty of people on one or the other..or both :-) At some point perhaps this mailing list will just get turned off, but there should, and appears to be, a transition period where both are active On Jan 18, 10:28 am, speedpac...@gmail.com speedpac...@gmail.com wrote: well, for starters the fact that Google does not accept my emails to the list, een though I'm subscribed, so for some reason it forces me to go to groups.google.com to submit any messages I'd like to submit, which to be honest has limited my contribution on the list to just some questions helping me, and noty contributing to solutions to other people's problems. Secondly - I prefer not to have too many email arriving; I prefer the pull mechanism where I decide to go read on the forum; I always have the feeling that mailing lists just push you with the info. And thirdly - the new forums look great :D Either way - from what I've read the list IS gonna disappear and IS gonna be replaced by the new forum; just not clear to me whether we're supposed to write here, or use the new forums now... Thanks! David. On 18 jan, 16:03, Rick Faircloth r...@whitestonemedia.com wrote: Hi, David... What do you find more appealing about forums than an email list? Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of speedpac...@gmail.com Sent: Monday, January 18, 2010 9:50 AM To: jQuery (English) Subject: [jQuery] new forums used? Hi there, I just noticed this group is still having lots of activity. I for one am very pleased to see we're moving to actual forum on forum.jquery.com, but it appears that moderation isn't done there yet (or I'm just too impatient...) Are we supposed to continue posting here, or was my first idea right to start using the new forum? Thanks so much for a fantastic library, great support, and a marvellous spirit :) David.
[jQuery] Re: Select part of text and add a CSS class
yes, it indeed is selection = getSelectedText(); if(selection.length = 3) { $(this).html($(this).html().addClass(selected); } to selection = getSelectedText(); if(selection.length = 3) { var $spn = $(span/span).html(selection).addClass (selected); // append/set this '$spn' inside another DOM object } to note, your original/non-working code seems to be trying to set the .html of an input or textarea, that's not a valid method to do on such items On Jan 18, 11:46 am, Mircea i...@amsterdamsat.com wrote: Yes, I want to be able to select a part of the text and add a span to it. Can this be done? Thank you.
[jQuery] Re: Select part of text and add a CSS class
it probably is working, but you failed to *do* anything with the generated span tag... that's why i added as a comment: // append/set this '$spn' inside another DOM object On Jan 18, 12:29 pm, Mircea i...@amsterdamsat.com wrote: Thanx for the code. It does not work to me. I am a newbye is JQuery, please excuse the dumb questions... This is my code and markup: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head script src=http://code.jquery.com/jquery-latest.js;/script script type=text/javascript src=http://jqueryui.com/latest/ui/ ui.core.js/script script type=text/javascript src=http://jqueryui.com/latest/ui/ ui.draggable.js/script script type=text/javascript $(document).ready(function(){ $(p).live(mouseup, function() { selection = getSelectedText(); if(selection.length = 3) { var $spn = $(span/span).html(selection).addClass (selected); // append/set this '$spn' inside another DOM object } } ); //Grab selected text function getSelectedText(){ if(window.getSelection){ return window.getSelection().toString(); } else if(document.getSelection){ return document.getSelection(); } else if(document.selection){ return document.selection.createRange().text; } } }); /script style p { color:blue; } div { color:red; } span.hl { background: yellow; } #selected {background: yellow;} .selected {background: yellow;} /style /head body div id=#container pthis is the text to be selected - a part of it/div /body /html
[jQuery] Re: Select part of text and add a CSS class
the variable name/reference is $spn so it would be: $(p).append($spn); your line of $(p).append(spn) does exactly what you told it to do :-) On Jan 18, 2:34 pm, Mircea i...@amsterdamsat.com wrote: I've added $(p).append(spn) It ads only the text spn at the bottom of the text. I probably did not used the append function right to pass the variable to p. Thanx
[jQuery] Re: click action effect/problem
Hope this helps put you on the path http://jsbin.com/ejuga3 (run) http://jsbin.com/ejuga3/edit (edit) Event Delegation = awesome knowledge to have http://www.learningjquery.com/2008/03/working-with-events-part-1 On Jan 18, 4:07 pm, Legostrat legost...@gmail.com wrote: Hey, I've got a toolbar on the bottom of my website, and I've got it to where a user clicks on a div tag, and it reveals another div tag, which contains the content described in the previous div. So if a person clicks on the div with share in it, a hidden div is revealed containing links to various social bookmarking options. Now, the button div contains the div that has the content. It's sorta like this: div id=button Click here div id=submenu option 1 option 2 /div /div So, when you click on the button div, it reveals the sub-menu div. The problem is that when you click on the content within the sub-menu it activates the .click action attached to the button div. I'm fairly sure this is normal behavior, but I'm not sure how to prevent it. I'd to be able to click on the content within the sub- menu and not have it activate the .click action attached to the button div. The reason I put the sub-menu within the button div, is that the button div animates to a wider width, and if I didn't put it inside, it the sub-menu would stay in place and not shift with the button div. Sorry about all the wordiness. Any solutions would be greatly appreciated. My website: calxanime.com The jquery is contained at:http://calxanime.com/smf/Themes/mobile_alt/scripts/jquery.custom.js Sign in to see the bottom bar with the username: Guestperson and the password: guest Thanks, Legostrat
[jQuery] Re: Select tab from link
if your link follows the pattern of having it's ID as linkXX where XX is the zero-based index of a tab, then the live binding will pick up any new instances of such links in your AJAX responses/ additions btw, i had a typo... lit.length should be hit.length On Jan 17, 11:06 am, CMI_Guy market...@cmilc.com wrote: MorningZ, Thanks for your reply. Something was missing from your syntax so I made one small change to your script: $(document).ready(function(){ var $tabs = $(#tabs).tabs(); $(a[id^='link']).live(click, function() { var hit = this.id.match(/^link(\d+)$/); if (hit lit.length == 2) { $tabs.tabs('select', hit[1]); return false; } }); }); But, I must admit I know next to nothing about jquery live events. Can you help me understand what markup I would need to put on a a href link to make this script work. I would love to be able to simplify my method for allowing text links on the page to interact with the tabs. Much Thanks!! On Jan 16, 9:38 pm, MorningZ morni...@gmail.com wrote: There's no need to repeat the code... you can even do it with .live so it'll work if there's 1 or 100tabs $(document).ready(function(){ var $tabs= $(#tabs).tabs(); $('a[id^='link').live(click, function() { var hit = this.id.match(/^link(\d+)$/); if (hit lit.length == 2) { $tabs.tabs('select', hit[1]); return false; } }); }); On Jan 16, 5:59 pm, CMI_Guy market...@cmilc.com wrote: StephenJacob, Sloppy fix. But works. script type=text/javascript $(document).ready(function(){ var $tabs= $(#tabs).tabs(); $('#link0').click(function() { // bind click event tolink $tabs.tabs('select', 0); // switch to first tab return false; });}); $(document).ready(function(){ var $tabs= $(#tabs).tabs(); $('#link1').click(function() { // bind click event tolink $tabs.tabs('select', 1); // switch to second tab return false; });}); $(document).ready(function(){ var $tabs= $(#tabs).tabs(); $('#link2').click(function() { // bind click event tolink $tabs.tabs('select', 2); // switch to third tab return false; });}); $(document).ready(function(){ var $tabs= $(#tabs).tabs(); $('#link3').click(function() { // bind click event tolink $tabs.tabs('select', 3); // switch to fourth tab return false; });}); $(document).ready(function(){ var $tabs= $(#tabs).tabs(); $('#link4').click(function() { // bind click event tolink $tabs.tabs('select', 4); // switch to fifth tab return false; });}); /script div id=tabs ul lia href=users-admin.phpAdministrators/a/li lia href=users-standard.phpUsers/a/li lia href=users-notify.phpProcess Users/a/li lia href=users-activity.phpUser Activity/a/li lia href=db-backup.phpDatabase Backup/a/li /ul /div TEXT LINKS elsewhere on page that activate thetabs. a href=users-standard.php id=link0Administrators/a a href=users-standard.php id=link1Users/a a href=users-notify.php id=link2Process Users/a a href=users-activity.php id=link3User Activity/a a href=db-backup.php id=link4Database Backup/a- Hide quoted text - - Show quoted text -
[jQuery] Re: autocomplete returning multiple identical values in dropdown
You pulling the data from server side code? if so, it's that codes responsibility to return unique values On Jan 17, 4:25 pm, rumremix sdiv...@gmail.com wrote: The autocomplete plugin I obtained fromhttp://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/is working great aside from one significant problem: it is returning multiple identical results in the dropdown. Say I wish to search for all records that contain 'march' in the month field and there are 12 such records that meet this criteria. I don't want a dropdown to appear that dispays 'march' 12 times if I type 'm' in the month field. I want only two values to appear exactly once each: 'march', and 'may'. It appears as though the code was written with the expectation that the data will contain all unique values. Or am I doing something wrong? I have been unable to see any option settings that control this. Thanks.
[jQuery] Re: background mouseover fade effect
For sure check out the color.js plugin (Google jQuery color.js and you'll find it)... it can animate the backgroundColor property, as for color, instead of none, you should be able to use transparent or better yet, just fade to the current page/DOM object background color On Jan 12, 5:25 pm, 1.am.W1z4rd 1.am.w1z...@gmail.com wrote: I need to add a mouseover effect to the navigation for a site that I'm building. I need the backgroundColor to fade from none, to black, and then on mouseout, I need it to fade back to none. This would be easy if I were using two colors, but since I'm using 'none' as one of the color's, I don't know what to do. I have tried: [code] $('.nav_link').hover(function() { $(this).animate({backgroundColor: '#00'});}, function() { $(this).animate({backgroundColor: 'none'});}); [/code] but that doesn't seem to work. Any help / plugin links would be greatly appreciated. Thanks, bye.
[jQuery] Re: Select tab from link
There's no need to repeat the code... you can even do it with .live so it'll work if there's 1 or 100 tabs $(document).ready(function(){ var $tabs = $(#tabs).tabs(); $('a[id^='link').live(click, function() { var hit = this.id.match(/^link(\d+)$/); if (hit lit.length == 2) { $tabs.tabs('select', hit[1]); return false; } }); }); On Jan 16, 5:59 pm, CMI_Guy market...@cmilc.com wrote: StephenJacob, Sloppy fix. But works. script type=text/javascript $(document).ready(function(){ var $tabs = $(#tabs).tabs(); $('#link0').click(function() { // bind click event to link $tabs.tabs('select', 0); // switch to first tab return false; });}); $(document).ready(function(){ var $tabs = $(#tabs).tabs(); $('#link1').click(function() { // bind click event to link $tabs.tabs('select', 1); // switch to second tab return false; });}); $(document).ready(function(){ var $tabs = $(#tabs).tabs(); $('#link2').click(function() { // bind click event to link $tabs.tabs('select', 2); // switch to third tab return false; });}); $(document).ready(function(){ var $tabs = $(#tabs).tabs(); $('#link3').click(function() { // bind click event to link $tabs.tabs('select', 3); // switch to fourth tab return false; });}); $(document).ready(function(){ var $tabs = $(#tabs).tabs(); $('#link4').click(function() { // bind click event to link $tabs.tabs('select', 4); // switch to fifth tab return false; });}); /script div id=tabs ul lia href=users-admin.phpAdministrators/a/li lia href=users-standard.phpUsers/a/li lia href=users-notify.phpProcess Users/a/li lia href=users-activity.phpUser Activity/a/li lia href=db-backup.phpDatabase Backup/a/li /ul /div TEXT LINKS elsewhere on page that activate the tabs. a href=users-standard.php id=link0Administrators/a a href=users-standard.php id=link1Users/a a href=users-notify.php id=link2Process Users/a a href=users-activity.php id=link3User Activity/a a href=db-backup.php id=link4Database Backup/a
[jQuery] Re: iPhone: split jquery script file
but what would be the point? say you got jQuery down to 10k in size that leaves 15k left for images and HTML and etc, it's just going to hit that limit and purge the cache anyways. but just a few requests sooner keep with the minified and gzipped version to keep the data sent across the connection to a minimum...ripping apart the library just doesn't seem worth the payoff, which isn't much anyways On Jan 14, 10:08 am, Peter Edwards p...@bjorsq.net wrote: There is an interesting article about optimising YUI for Safari/iPhone at: http://tinyurl.com/y97karc (there was a problem with the blog's database connection, so this links to a cached version) With the following in it: Some examples of the kinds of things an iPhone-specific site doesn’t need: * Keyboard navigation and shortcuts: The iPhone doesn’t have arrow keys and the keyboard only appears when a text input element has focus, so code that handles keyboard shortcuts and navigation events is unnecessary. * Hover states and mouse movement handlers: Since the iPhone is a touchscreen device, there’s no mouse cursor and thus no way for the user to hover over an element. Mobile Safari fires the mousemove and mouseover events just before the mousedown, mouseup, and click events, and it fires the mouseout event when an element loses focus. * Context menus: There’s no way to right-click or control-click on the iPhone, so the contextmenu event cannot be triggered. * Text selection and clipboard handlers: Sadly, the iPhone does not provide clipboard functionality or a way to select text in an input element, so these handlers are useless. I guess you could edit all these parts out of the uncompressed jQuery source, and then compress it all down to less than 25Kb - has anyone done this? On Thu, Jan 14, 2010 at 9:30 AM, m-schmidt micha_schm...@me.com wrote: Hi, the iPhone has a cache limit of 25KB, so the jquery script file will never be cached. Is it possible to split the jquery file in 5-10 smaller files for the iPhone? thanks, Micha
[jQuery] Re: iPhone: split jquery script file
Ah, that makes sense now. when i did my site's iPhone version I time and time again was reading of the limits of Safari's cache. i didn't fight or test those limits and my site loads/runs just fine (http://iphone.team-integra.net)... (any huge delays in loading a page are from me on the server site loading remote images, resizing them to a phone-friendly size, and replacing the HTML with this new image) There was talk at the jQuery conference in September of the code getting a mobile-specific offshoot. i'm not sure if that was planned on the 1.4 release (which is now just 30 mins away) On Jan 14, 10:30 am, Peter Edwards p...@bjorsq.net wrote: The cache limit is for individual files, so you get jquery down under 25K, then use CSS sprites (with images less than 25K) for backgrounds - the total cache size is 475K (a maximum of 19 components can be cached). Gzipping doesn't count (the limit applies to uncompressed code) but minifying is a must I guess. On Thu, Jan 14, 2010 at 3:13 PM, MorningZ morni...@gmail.com wrote: but what would be the point? say you got jQuery down to 10k in size that leaves 15k left for images and HTML and etc, it's just going to hit that limit and purge the cache anyways. but just a few requests sooner keep with the minified and gzipped version to keep the data sent across the connection to a minimum... ripping apart the library just doesn't seem worth the payoff, which isn't much anyways On Jan 14, 10:08 am, Peter Edwards p...@bjorsq.net wrote: There is an interesting article about optimising YUI for Safari/iPhone at: http://tinyurl.com/y97karc (there was a problem with the blog's database connection, so this links to a cached version) With the following in it: Some examples of the kinds of things an iPhone-specific site doesn’t need: * Keyboard navigation and shortcuts: The iPhone doesn’t have arrow keys and the keyboard only appears when a text input element has focus, so code that handles keyboard shortcuts and navigation events is unnecessary. * Hover states and mouse movement handlers: Since the iPhone is a touchscreen device, there’s no mouse cursor and thus no way for the user to hover over an element. Mobile Safari fires the mousemove and mouseover events just before the mousedown, mouseup, and click events, and it fires the mouseout event when an element loses focus. * Context menus: There’s no way to right-click or control-click on the iPhone, so the contextmenu event cannot be triggered. * Text selection and clipboard handlers: Sadly, the iPhone does not provide clipboard functionality or a way to select text in an input element, so these handlers are useless. I guess you could edit all these parts out of the uncompressed jQuery source, and then compress it all down to less than 25Kb - has anyone done this? On Thu, Jan 14, 2010 at 9:30 AM, m-schmidt micha_schm...@me.com wrote: Hi, the iPhone has a cache limit of 25KB, so the jquery script file will never be cached. Is it possible to split the jquery file in 5-10 smaller files for the iPhone? thanks, Micha
[jQuery] Re: autocomplete: extra fields
I tried for so long to accomplish what you ask (which i think is tell the server side autocomplete target what field am i?), only to throw up my hands in dismissal... I finally just did it this way: say i had: input type=text id=AC_Name class=ac / input type=text id=AC_Email class=ac / input type=text id=AC_Title class=ac / I just wired up the plugin like so: $(.ac).each(function() { $(this).autocomplete( target.html, { extraParams : { id: $(this).attr(id) } } ); }); now id=AC_Name or id=AC_Email or id=AC_Title gets sent along in the querystring to target.html maybe there's a more elegant way to do it, but i gave up finding it :-) On Dec 18 2009, 8:27 pm, Simon Matthews sam.applic...@googlemail.com wrote: I have a number of fields in a grid which are all using auto complete. I want the extraParams function to be able to work out which field I am in so that I can return a differently filtered list. I don't seem to have access to the input variable? Any clues? Thanks Simon
[jQuery] jQuery 1.4 is released
Just saw on my RSS reader that: http://jquery14.com/day-01/jquery-14 Impressive that it's already hosted by Google Ajax Libraries
[jQuery] Re: JSON and variables
Loop through the data, not the inputs so like: $.each(data, function(k, v) { var txt = document.getElementById(k); if (txt) { $(this).val(v); } else { // could not find input } }); On Jan 14, 3:35 pm, T.J. Simmons theimmortal...@gmail.com wrote: Hi all, Got a quick question for you. I have a form with several text fields. I'm using AJAX to load data into the fields at page load, using JSON. Instead of manually writing code to fill each field, I'm wanting to use some sort of loop to do this.. but I'm unable to think of a way to do so right now. Here's an example of what I'm thinking of.. The field in the JSON object that holds the value corresponds with the field's ID.. ie, { custName: bob } can be retrieved by data.custName manually. success: function(data) { $(input:text).each(function(){ part = $(this).attr(id); $(this).val(data.part); }); } but that obviously doesn't work, since it's trying to retrieve part from the data object, instead of using the variable's value. Does anyone have a way of doing this? Thanks. -- T.J.
[jQuery] Re: Autocomplete incompatible with certain struts-tiles-javascript apps
is that a straight dump of your code? if so, you don't have script tags around your JavaScript after the closing /html tag On Jan 14, 5:24 pm, j...@verax joti.bis...@gmail.com wrote: Hi jQuery guru, I have an application based on struts and tiles. Validation is done by javascript at a global level. When I include my autocomplete code in my JSP page, the validation (checkValidation()) malfunctions with a javascript error - Object does not support this property or method at the line if (CCRDerrorContainer.hasChildNodes()). If I remove the autocomplete code from my JSP (business logic + autocomplete libraries) , the validation works as designed. Details of relevant code is provided below. Can anyone provide me with any clue as to how to resolve this problem ? == --- My JSP file --- %@ include file=../common/include.jsp % link rel=stylesheet type=text/css href=css/ jquery.autocomplete.css / script type=text/javascript src=js/autocomplete/lib/jquery.js/ script script type='text/javascript' src='js/autocomplete/ jquery.autocomplete.js'/script script var cols = []; // column mappings : 0=Last name, 1=First Name, 2=Title, 3 = Employee ID $().ready(function() { $('input#employeeLastName').flushCache(); $(#employeeLastName).autocomplete(jsp/common/getData.jsp? dataType=EmployeeName,{ minChars: 1, max: 1000, width: 400, delay: 1000, selectFirst: false, autoFill: false, cacheLength: 20, matchContains: false, matchSubset: true, mustMatch: false, matchCase: true, formatItem: function(row, i, max) { cols = row[0].split(%); return i + / + max + : + cols[0] + , + cols[1] + ( + cols[2] + ); }, formatMatch: function(row) { cols = row[0].split(%); return cols[0] + , + cols[1]; }, formatResult: function(row) { cols = row[0].split(%); return cols[0] + , + cols[1] + ( + cols[2] + ); } }); $(#employeeLastName).result(function(event, row, formatted) { if (row) { cols = row[0].split(%); $(this).next().val(cols[3]); } }); }); /script tiles:importAttribute name=task / tiles:importAttribute name=action / tiles:importAttribute name=displayAction / tiles:importAttribute name=showArchived / style type=text/css @import ${pageContext.request.contextPath}/css/employee/select.css; /style h1 fmt:message key=employee.label.title.select / /h1 hr / div id=employeeSelect tiles:insert definition=successMessages / tiles:insert definition=failureMessages / ccrd:errors / html:form action=${action} method=post label for=employee id=employeeLbl fmt:message key=employee.text.selectEmployee / span class=taskfmt:message key=${task} /:/span /label html:text styleId=employeeLastName property=lastName size=100 maxlength=200 /html:text html:hidden property=employeeId / BR/ BR/ div class=buttons html:submit property=submit styleId=submitButtonfmt:message key=button.submit//html:submit html:submit property=cancel styleId=cancelButtonfmt:message key=button.cancel//html:submit /div /html:form /div
[jQuery] Re: Converting a javascript to jQuery
While i only have a minute to help, i can point out quickly that var divs = document.getElementsByTagName('DIV'); var divCounter = 1; for(var no=0;nodivs.length;no++){ if(divs[no].className=='breakbg'){ divs[no].onclick = showHideContent; divs[no].id = 'ssdm'+divCounter; ... } } Can be $(div.breakbg).each(function(i) { var $div = $(this).attr(id, ssdm + (i + 1)).click (showHideContent); // you can now use jQuery object $div to reference the rest }); And keep in mind one thing like the reply above almost says: jQuery *is* JavaScript... that seems to get over looked a lot On Jan 13, 4:48 am, modestmj amdmuja...@gmail.com wrote: Hello everyone...I'm really new to jQuery..I have an urgent requirement to convert this javascript to jQuery...So please...try to help me with this.. function initShowHideDivs() { var divs = document.getElementsByTagName('DIV'); var divCounter = 1; for(var no=0;nodivs.length;no++){ if(divs[no].className=='breakbg'){ divs[no].onclick = showHideContent; divs[no].id = 'ssdm'+divCounter; var answer = divs[no].nextSibling; while(answer answer.tagName!='DIV'){ answer = answer.nextSibling; } //divs[no].className=='ssdhead'; answer.id = 'ssds'+divCounter; contentDiv = answer.getElementsByTagName('DIV')[0]; contentDiv.style.top = 0 - contentDiv.offsetHeight + 'px'; contentDiv.className='ssdcontent'; contentDiv.id = 'ssdsc' + divCounter; answer.style.display='none'; answer.style.height='1px'; divCounter++; } } } function showHideContent(e,inputId) { if(yatrassd_slideInProgress)return; yatrassd_slideInProgress = true; if(!inputId)inputId = this.id; inputId = inputId + ''; var numericId = inputId.replace(/[^0-9]/g,''); var answerDiv = document.getElementById('ssds' + numericId); var imgId = document.getElementById('arrowimg'+ numericId); objectIdToSlideDown = false; if(!answerDiv.style.display || answerDiv.style.display=='none'){ imgId.src='/yatra_blue-theme/images/hotel/ssdarrowdown.gif'; if(yatrassd_activeId yatrassd_activeId!=numericId){ objectIdToSlideDown = numericId; slideContent(yatrassd_activeId,(yatrassd_slideSpeed*-1)); imgId.src='/yatra_blue-theme/images/hotel/ssdarrowup.gif'; }else{ answerDiv.style.display='block'; answerDiv.style.visibility = 'visible'; imgId.src='/yatra_blue-theme/images/hotel/ssdarrowup.gif'; slideContent(numericId,yatrassd_slideSpeed); } }else{ slideContent(numericId,(yatrassd_slideSpeed*-1)); yatrassd_activeId = false; imgId.src='/yatra_blue-theme/images/hotel/ssdarrowdown.gif'; } } -- View this message in context:http://old.nabble.com/Converting-a-javascript-to-jQuery-tp27142142s27... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Shortest possible method of adding/removing class on mouseenter/leave without a plugin
i don't understand the .each part jQuery is already going to do that $('#nav li').bind('mouseenter mouseleave', function() { $ (this).toggleClass('hover'); }); *should* be equiv, although i must say that's untested and how about *zero* jQuery code and just using CSS's :hover pseudo? http://www.w3schools.com/css/pr_pseudo_hover.asp On Jan 13, 1:22 pm, seasoup seas...@gmail.com wrote: Is this it, or do you have something shorter? $('#nav li').each( function () { var $this = $(this); $this.bind('mouseenter mouseleave', function() { $this.toggleClass('hover') }); }); I thought hover would work, but it only does the mouseenter with one parameter, instead of doing the same function for both enter and leave. $('#nav li').each( function () { var $this = $(this); $this.hover(function() { $this.toggleClass('hover') }); // only mouseover }); which could be abstracted to a hoverClass plugin $('#nav li').hoverClass('hover');
[jQuery] Re: Tabbed view and Flash Movies
This is completely untested, but it would seem to make sense to work Given this HTML div id=tabs ul lia href=video1.phpTab 1/a/li lia href=video2.phpTab 2/a/li lia href=video3.phpTab 3/a/li /ul div/div div/div div/div /div then $(document).ready(function() { $(#tabs).tabs({ select: function(event, ui) { $(#tabs ul li).each(function(i) { if (ui.index != i) { $(#tabs div:nth-child( + (i+1) + )).html (); } }); }; }); }); On Jan 13, 6:01 pm, DaveMK davemarc...@hotmail.com wrote: Hi anyone that can help! I'm stuck and not sure how to proceed. Here's the issue: I am using jQuery tabs (seven tabs in total), and loading in iframed pages into the tab with .flvs in them. That's all working, but the issue is that I can't figure out how to get the tab to unload, so if you click on one tab and start the movie, and then click on another tab and start another movie, they both play. I can't use .php to fix this due to constraints out of my control... I'm stuck with html, css and jQuery. Any ideas on a couple nice lines of code that I could use to get this to work? If you want to see the live example, please tell me and I will send it. -- View this message in context:http://old.nabble.com/Tabbed-view-and-Flash-Movies-tp27153555s27240p2... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: added form elements not sent using Firefox
Could this be jquery related? Do you have any example code to build an answer upon? On Jan 12, 2:49 am, Eric Cope eric.c...@gmail.com wrote: Hello all, I am using jquery to copy a DIV containing some form elements. The copy is appended to the DIV in another DIV to allow an unlimited number of form elements to be sent. The problem is that none of the copy DIVs are being sent by the browser (Firefox). There is some chatter via google, but nothing conclusive. I see the DIVs show up in Firebug. Could this be jquery related? Thanks in advance! Eric
[jQuery] Re: long-term browser support strategy
If w3schools' statistics are at all accurate, there are about the same number of people using IE 6 as either IE 7 or 8 Stats like that are nice, but I'd be curious to see what kinds of browser stats there are for other people running a (relatively) busy site? real people, like on this list... not some website who have no idea where they get their numbers from While even today IE is still a large chunk of browser usage out there thanks to the hoards of people who don't know better (like for instance, my parents), my primary side is like 40% FF, %38 IE (of which i find amazingly, half of those are IE8.. only 10% IE6), 10% Safari, 7% Chrome and that's out of 230,000 unique visits in the past 30 days.. 10% of 38% of IE6 (almost 9,000 visitors) is still a headache to deal with at this point, thankfully jQuery still makes it less of a headache :-) and it's much appreciated I'd lve to just say screw IE6.. IE7 for that matter too. but unfortunately for one reason or another the masses aren't helping that thinking becoming reality any time soon On Jan 12, 9:15 am, Thomas thpick...@googlemail.com wrote: Here's a post from John's blog in which he touches the topic of a general strategy for browser support:http://ejohn.org/blog/the-browsers-of-2009/ He also briefly writes about it in his (latest?) book:http://www.manning.com/resig/ Finally, John's (and thus jQuery's) testing strategy is to test against the previous, the current, and the upcoming (nightly build) version of supported browsers. [citation needed] :p P.S.: When I write 'John', it's probably really the whole team behind jQuery that worked out those approaches. On Jan 12, 12:41 pm, RobG rg...@iinet.net.au wrote: On Jan 12, 1:24 pm, Nathan Klatt n8kl...@gmail.com wrote: IE 6 use is 3 times that of Safari (all versions) depending on whose statistics you believe. Why not drop support for Safari while you're at it? And Opera and Chrome? Because you don't have to do anything to support Safari or Chrome or Opera There are at least 5 Safari-specific quirks catered for in jQuery (I just searched for Safari in comments), there are likely others. Admittedly that's far fewer than are required for IE, but since IE 6 is now about 10 years old, surely it's quirks are well known and catered for? - they actually work. To stop supporting them you'd have to stop supporting standards. Browsers will continue to evolve. If appropriate feature detection is already in place and effective alternatives provided to handle quirks, you may find that you are handling some new quirks without having to write a single line of code. :-) For example, while the bit in jQuery that checks if the event.target is a textNode is meant for Safari (pre version 3 I think), it will work for any browser that has such behaviour. Safari's behaviour was actually compliant with the spec, the far more common behaviour (i.e. that event.target is always a nodeType 1) is not compliant. I work with several clients that do not want to lead the way in this respect, and need to support IE6 as long as it has a fair usage share, which may be for several more years.] That is a sensible decision Anyone clinging to IE6, at this point, has gone wy beyond not leading the way! If w3schools' statistics are at all accurate, there are about the same number of people using IE 6 as either IE 7 or 8. Of course support might mean whether new functionality is provided for old browsers and whether they continue to be part of a test suite. New functions that aren't tested in old browsers can simply be marked in the documentation, or simply features add after version x.y have not been tested in browser X so users know not to use them. -- Rob
[jQuery] Re: Does anybody know when jquery 1.3.3 or 1.4 will be released?
Just to follow up on this, looks like the RC1 version of 1.4 is close... really close :-) Damn IE6 !! From: http://twitter.com/jeresig # Grrr, phantom bug popped up in IE 6 just as I was about to push 1.4rc1 live. # Need sleep in order to fight, 1.4rc1 tomorrow. # - about 11 hours ago from web
[jQuery] Re: Argh!! IE8!
What makes it hard to follow your code, what is d?$(document).click(function(d){ why is is about clicking on the document? what is a?if($(#acc+a).is(:visible)){ also, have you considered moving away from :visible? it's got it's quirks and niches going across browsers... maybe using CSS classes and hasClass, addClass, removeClass instead? On Jan 12, 11:31 am, Valerij valeri...@gmail.com wrote: Alright, I've changed the as that are not links to divs, page is fully valid now, but same thing happens! Just that nows its totally impossible to open ANY of popup while it works in all other browsers! On Jan 12, 9:19 am, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: RobG wrote: On Jan 12, 5:51 am, Valerijvaleri...@gmail.com wrote: Hey guys, I have this popup menu that works.. great! In Chrome, Safari, Firefox AND it USED to work in IE8, until I added just 1 div. [...] This works in all the browsers great even after I added this div, but in IE8 it suddenly stopped. a id=acc class=baritem href=javascript:void(0);div class=textupMy Account/div/a Your markup is invalid, div elements don't belong inside a elements. [...] Is there a fix for this? Start with valid markup:URL:http://validator.w3.org/ Also, if it's not a link, don't use an a element. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Function help
$('#new').live('click', function() { addRecord($(this).closest(form).attr(id)); }); function addRecord(form_id) { .. stuff ... });
[jQuery] Re: Disable Submit
Personally i suggest using BlockUI to overlay the whole form... that way 1) not possible for your user to resubmit 2) gives dead obvious indication something is going on 3) simple as can be to use On Jan 12, 2:49 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I have a form i am submitting via Ajax. So after submit while its waiting for response i have my little spinner so user knows something is happening. But how can i disable the submit while its thinking waiting for a response so the user is not sitting there clicking submit over and over. Using this for my js as of now; $('#new_set').live('click', addRecord); function addRecord() { var data = $('#add').serialize(); $(#add).slideToggle('fast'); $('.flash').prepend('div class=saving/div'); //$('#new_set').die('click'); $.ajax({ type: post, url: /manage/awards/add, data: data, dataType: 'json', success: function(response){ if (response.status === true) { alert(response.status); $('.saving').remove(); } else { //$('#new_set').live('click'); alert(response.status); $('.saving').remove(); } } }); } I tried adding $('#new_set').die('click'); but then it never submitted. Thanks Dave
[jQuery] Re: Disable Submit
Dave here's a quick 2 minute example of this topic and the other topic http://jsbin.com/efona/edit (code) http://jsbin.com/efona (run) very little jQuery to wire that up :-)
[jQuery] Re: Disable Submit
btw, i forgot to add return false; to the end of both button events there, that would be needed
[jQuery] Re: Ajax forms help
But if I am returning json I cant return my normal html I don't understand why... I pretty much exclusively use JSON back and forth in my jQuery AJAX calls and have a standard JSON object i return: { HasError: boolean, Message: string. Data: object, Count: integer } Many times i'll return HTML on the data property there i think the problem you are having is how you are creating the JSON return string, maybe that's not the right way to do it in PHP ?? (to note, i'm a .NET guy, i don't know what the PHP way is) On Jan 11, 10:06 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Right on...looks easy enough. Is response.html saying to display it as html? I tried making an array to pass as json from php then json_encode it so my arrr was $response = array('status' = true , 'view' = 'all my html code went here') But when I returned my view data from the array it was all slahsed // // / / / like that. -Original Message- From: Ibatex [mailto:mjgris...@gmail.com] Sent: January-11-10 4:35 AM To: jQuery (English) Subject: [jQuery] Re: Ajax forms help The beauty of json is that you can transfer alot of different data in an organized way. You can very easily send back success/failure status along with the html. success: function(response) { // Response was a success if (response.status) { //update my target div $('#target_div').html(response.html); // Response contains errors } else { // return the form with the errors } On Jan 10, 5:00 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I need some help with a form. I submit the form fine, my problem is depending on the success or failure of the form being saved. I will try to explain as simple as possible form is in its own div form here . div target saved data will appear here/div So what I need is i guess json success true or false response from the form being saved or not then in my success success: function(response) { // Response was a success if (response) { //update my target div // Response contains errors } else { // return the form with the errors } But if I am returning json I cant return my normal html after the successful save, and if I return my response as html there is no way to tell the js what to do. The form or the target is html code How can I tell what the response was (true or false) and return the appropriate html code for the appropriate form or target? Thanks Dave No virus found in this incoming message. Checked by AVG -www.avg.com Version: 9.0.725 / Virus Database: 270.14.130/2607 - Release Date: 01/10/10 16:05:00
[jQuery] Re: Problem with jquery tabs on live site
Are you looking to make an AJAX request to load the tab? i don't think you are considering your markup... change div id=relatedTabs class=sidebarSection p class=infoText sidebarTitlestrongRelated/strong/p ul id=relatedTabBar lia href=article/goerlitzer- park.html#related-1spanArticles/span/a/li lia href=article/goerlitzer- park.html#related-2spanFiles/span/a/li lia href=article/goerlitzer- park.html#related-3spanLinks/span/a/li /ul to p class=infoText sidebarTitlestrongRelated/strong/p div id=relatedTabs class=sidebarSection ul id=relatedTabBar lia href=#related-1spanArticles/span/a/li lia href=#related-2spanFiles/span/a/li lia href=#related-3spanLinks/span/a/li /ul On Jan 11, 8:40 am, Coxy step...@bungert.co.uk wrote: Sorry, I wasn't sure if one was needed. Here is an example: http://krautspotter.bungert.co.uk/article/goerlitzer-park.html This loading of the whole page never happened with the static mock-up. Also jquery seems to have created it's own tabs. I never called them hrefs like #ui-tabs-22
[jQuery] Re: Problem with jquery tabs on live site
yes, change the a tags in the code above as shown... but putting a URL there you are telling the tabs plugin go get this via AJAX request On Jan 11, 11:43 am, Coxy step...@bungert.co.uk wrote: No I'm not, and in my static mock-up everything was ok. It does this on the live site, and I want to find out why. Do you know how to stop it?
[jQuery] Re: Problem with jquery tabs on live site
yes, change the a tags in the code above as shown... by putting a URL there you are telling the tabs plugin go get this via AJAX request See: http://jqueryui.com/demos/tabs/#ajax - Fetch external content via Ajax for the tabs by setting an href value in the tab links. While the Ajax request is waiting for a response, the tab label changes to say Loading..., then returns to the normal label once loaded - you've got URL's in your href parameters, causing tabs to go AJAX On Jan 11, 11:43 am, Coxy step...@bungert.co.uk wrote: No I'm not, and in my static mock-up everything was ok. It does this on the live site, and I want to find out why. Do you know how to stop it?
[jQuery] Re: Problem with jquery tabs on live site
it can be easier than that, not so many variables to worry about :) right before $(#relatedTabs).tabs(); put $(#relatedTabs ul a).attr(href, function() { if ($(this).attr(href).indexOf(#) -1) { return # + $ (this).attr(href).split(#)[1]; } else { $(this).attr(href); } }); On Jan 11, 2:11 pm, Coxy step...@bungert.co.uk wrote: tabLinks = $('#relatedTabBar li a'); numOfTabs = tabLinks.length; for (index = 0; index numOfTabs; index ++) { oldAnchor = $(tabLinks[index]).attr('href'); hashPos = oldAnchor.indexOf('#'); newAnchor = oldAnchor.substr(hashPos); $(tabLinks[index]).attr('href', newAnchor); } Sorry code was wrong before
[jQuery] Re: Ajax forms help
Hmm, that's weird... i don't know why escaping/unescaping is an issue... this is an actual working example of returned JSON from what I am working on today: stripped down a bit for brevity, and since Google Groups will break up the Data line, it's really all one line (no line breaks like i added) { HasError:false, Mode:Cache_List, Message:, Data:table class=\Cache_Table\ thead trthFile Name/th/tr /thead tbody trtd022308_Post_Attempt.xml/td/tr /tbody/table } and i just simply say $(#Results).html(response.Data); there's no action directly needed by me to unescape the class name of the table On Jan 11, 3:41 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Sorry for the number of back to back posts...just making progress somewhat. OK! I got it part ways no more html after the JSON. {data:{title:,year_rec:{year:2010},description:,id:6186d5 5b8f0,profile_id:4b40eea7-2608-4a3b-9c24-7cb04adcd75b},status:true,h tml:pthis is a good test\/p\r\n} Now to display the HTML but without all the \/p\r\n Dave From: John Arrowwood [mailto:jarro...@gmail.com] Sent: January-11-10 4:45 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Re: Ajax forms help Your problem looks like it may be on the back-end. Send the code that generates the JSON. On Mon, Jan 11, 2010 at 11:41 AM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: My response comes back from the server looking like this: (don't think its right to begin with) {data:{title:,year_rec:{year:2010},description:,id:0936d6 115e4,profile_id:4b40eea7-2608-4a3b-9c24-7cb04adcd75b},status:true,h tml:pthis is a good test\/p\r\n}pthis is a good test/p But how would I display only the html section and clean it so its not all slashed and escaped? Thanks Dave -Original Message- From: MorningZ [mailto:morni...@gmail.com] Sent: January-11-10 11:44 AM To: jQuery (English) Subject: [jQuery] Re: Ajax forms help But if I am returning json I cant return my normal html I don't understand why... I pretty much exclusively use JSON back and forth in my jQuery AJAX calls and have a standard JSON object i return: { HasError: boolean, Message: string. Data: object, Count: integer } Many times i'll return HTML on the data property there i think the problem you are having is how you are creating the JSON return string, maybe that's not the right way to do it in PHP ?? (to note, i'm a .NET guy, i don't know what the PHP way is) On Jan 11, 10:06 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Right on...looks easy enough. Is response.html saying to display it as html? I tried making an array to pass as json from php then json_encode it so my arrr was $response = array('status' = true , 'view' = 'all my html code went here') But when I returned my view data from the array it was all slahsed // // / / / like that. -Original Message- From: Ibatex [mailto:mjgris...@gmail.com] Sent: January-11-10 4:35 AM To: jQuery (English) Subject: [jQuery] Re: Ajax forms help The beauty of json is that you can transfer alot of different data in an organized way. You can very easily send back success/failure status along with the html. success: function(response) { // Response was a success if (response.status) { //update my target div $('#target_div').html(response.html); // Response contains errors } else { // return the form with the errors } On Jan 10, 5:00 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I need some help with a form. I submit the form fine, my problem is depending on the success or failure of the form being saved. I will try to explain as simple as possible form is in its own div form here . div target saved data will appear here/div So what I need is i guess json success true or false response from the form being saved or not then in my success success: function(response) { // Response was a success if (response) { //update my target div
[jQuery] Re: Fade question
I used the color plugin for exactly that... works really well http://plugins.jquery.com/project/color http://dev.jquery.com/~john/ticket/fx-rewrite2/ On Jan 11, 5:35 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: When i add a new record its inserted into a div. How can I make it so its has a color then fades out. Kind of like a success message after you save something only i am just fading out the color not the content. jquery UI highlight is a good example of the idea i am looking for. So I have my: $(response.html).hide().prependTo('#sortable').slideDown('slow'); so i would like it to be yellow for example when the user first sees the new record then slowly fade out leaving only the record. Thanks Dave
[jQuery] Re: Fade question
I forgot to add, that demo page doesn't exact have a bare bones example of just the color part.. so here is one http://jsbin.com/unuru/edit (code) http://jsbin.com/unuru (run) including the color.js pretty much let's one use the .animate method with these CSS properties: 'backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor' On Jan 11, 6:35 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Right on thanks... I looked around but noting simple so I will def check it out. Thanks. Dave -Original Message- From: MorningZ [mailto:morni...@gmail.com] Sent: January-11-10 7:30 PM To: jQuery (English) Subject: [jQuery] Re: Fade question I used the color plugin for exactly that... works really well http://plugins.jquery.com/project/colorhttp://dev.jquery.com/~john/ticket/fx-rewrite2/ On Jan 11, 5:35 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: When i add a new record its inserted into a div. How can I make it so its has a color then fades out. Kind of like a success message after you save something only i am just fading out the color not the content. jquery UI highlight is a good example of the idea i am looking for. So I have my: $(response.html).hide().prependTo('#sortable').slideDown('slow'); so i would like it to be yellow for example when the user first sees the new record then slowly fade out leaving only the record. Thanks Dave No virus found in this incoming message. Checked by AVG -www.avg.com Version: 9.0.725 / Virus Database: 270.14.130/2607 - Release Date: 01/11/10 16:05:00
[jQuery] Re: any help on this!!!
to start with... a button doesn't toggle you want the click event there then you'll want to do a check to see if the li is blue, if it is, remove blue, otherwise add it better use, use a CSS class with color: blue .blue { color: blue; } then you can say $('#jqdt').find('ol li:eq(0)').toggleClass(blue); On Jan 11, 5:45 pm, JQueryNewbie gibtronics2...@gmail.com wrote: I cant get my color change on my listitem. any help would be appreciated. Thanks in advance. head title/title script src=scripts/jquery-1.3.2.js type=text/javascript/ script script type=text/javascript $(document).ready(function() { $(dt-link1).toggle(function() { $('#jqdt').find('ol li:eq(0)').css(color,Blue); return false; }); }); /script /head body div id=jqdt ol lilist item 1 with dummy link to silly.pdf /li lilist item 2 with class=goofy /li lilist item 3 SURPRISE! /li lilist item 4 with silly link to silly.pdf /li /ol /div br/ button id=dt-link1 type=buttontoggle first list item/button button id=dt-link2 type=buttontoggle first li even/button /body
[jQuery] Re: looping through form elements.
$(':input').each(function(idx, item) { alert(idx); }); There are lots of form controls that aren't input elements. They are all in the form's elements collection. But the :input selector will also get non-input elements: http://docs.jquery.com/Selectors/input Overview: Matches all input, textarea, select and button elements. On Jan 10, 2:09 am, RobG rg...@iinet.net.au wrote: On Jan 8, 8:33 am, rich dottedq...@gmail.com wrote: Hello all, I'm relatively new to JavaScript. I would like to loop through all the elements within a form and grab their values and what type of input they are. So far I came up with: $(':input').each(function(idx, item) { alert(idx); }); There are lots of form controls that aren't input elements. They are all in the form's elements collection. The alert is placed there to see if it loops and it works as expected. I'm not sure how to alert the input's value and what type it is. Any help is greatly appreciated. A form element's value is stored in its value property, its type is stored in its type property. So: var el, elements = document.forms[formName].elements; for (var i=0, len=elements.length; ilen; i++) { el = elements[i]; alert( el.type + ': ' + el.value); } -- Rob
[jQuery] Re: Can we use jquery for paging and sorting in asp.net 2.0 ?????
Jackson as professional programmer who exclusively does .NET, allow me to tell you that getting into jQuery changes *everything* .NET's built in controls and jQuery (or any AJAX library in general minus MS Ajax or whatever they call it nowadays) do not play nicely together... in the case of thinking ASP.NET GridView + jQuery pagination, sorting, etc, it is much better in many ways to think instead: use ASP.NET and SQL Server to do the actual paging/sorting and feed that resultant data into something like jqGrid At this point in my programming career, which just entered year # 10, I barely do anything with asp: controls anymore, ASP.NET is simply the tunnel I use between my client script and the data But this is just my personal experience your mileage may vary On Jan 8, 10:12 am, Mike Alsup mal...@gmail.com wrote: take a look at jqGrid http://www.trirand.com/blog/ jqGrid rocks!!
[jQuery] Re: help fix syntax
When you make an AJAX call, what this references changes $('a.del').click(function() { var $parent = this.parent(); //i assume you want the parent of the a $.post('/img/del.php') , {'img': img }, function(){ if (e.status == 'deleted') { //e of the original function call? $parent().remove(); } }, 'json'); return false; //stops the a's action }); maybe if you better explain what you are trying to do, it would be easier to point the path On Jan 7, 7:16 am, runrunforest craigco...@gmail.com wrote: syntax a: not working, the parent of current element not being removed $('a.del').click(function(e){ e.preventDefault(); $.post('/img/del.php') , {'img': img }, function(e){ if(e.status == 'deleted') {$(this).parent().remove();} }, 'json'); }); syntax b: work but its not doing things correctly. $('a.del').click(function(e){ e.preventDefault(); $.post('/img/del.php'), {'img': img }, function(e){ if(e.status == 'deleted') {} }, 'json'); $(this).parent().remove(); });
[jQuery] Re: JQuery files(.js) required
None of those are redundant, but three tips: 1) make sure you are using the minified versions in the production enviroment 2) if you are really going to put the files together, which will be minimal gain, make sure that each and every section ends with a semi- colon, so the code doesn't get run all together 3) realize that these files are only going to get downloaded once to the users browser until the cache is cleared... so if you have 200k of script, it's not like on every single page load that that 200k is going to go across the wire again (it's not) On Jan 7, 8:44 am, NMarcu marcu.nico...@gmail.com wrote: Hello, My site is loading very slow with all js files imported, so I putted all in one single file. I have a question. I have some file that I think I don't need it. I'm loading this files: jquery-1.3.2.js, jquery.bgframs.js, jquery.ui-1.7.2.custom.min.js, ui.core.js, ui.draggable.js, ui.resizable.js, ui.dialog.js, effects.core.js, effects.highlight.js, ui.tabs.js, editable,js I need jquery for dialog, tabs, editable field, what files is redundant information, and I can lost of it...I need minimum of data to import
[jQuery] Re: JQuery files(.js) required
oh yeah, the custom has the functionality built in... i was thinking core.. my bad On Jan 7, 9:18 am, Mike Alsup mal...@gmail.com wrote: None of those are redundant, but three tips: Actually all of the individual jquery UI files are redundant with jquery.ui-1.7.2.custom.min.js if that download was configured properly. Try with just these three: jquery-1.3.2.js, jquery.bgiframe.js, jquery.ui-1.7.2.custom.min.js
[jQuery] Re: img src replacement
$(this).attr({'img src' : './images/avail_hover.png'}); there is no img src attr, but there is src, so $(this).attr('src', './images/avail_hover.png'); and there's a second event to hook on the .hover event is when you mouse off, so use that event to revert back to whatever image was there On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote: In my footer I have a sign where I want it to say one thing regularly, and then when someone hovers, i want it to say sometyhing else. I basically made 2 images, and I just want to switch images on the hover. here is my code I used and its not working.: $(#footer #footer-contain #availability img).hover(function () { $(this).attr({'img src' : './images/avail_hover.png'}); } can anyone help me out with what I need to do?
[jQuery] Re: img src replacement
Perhaps the path to the image itself isn't ./images ? Other than that,maybe some more code to show or better yet a live, non- working page.. Rest assured the hover event does work, and the way to set an img's source is $(this).attr(src) ... there's something else not seen/talked-about/thought-of that is the issue :-) On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote: I have it now set up like this: $(#footer #footer-contain #availability img).hover(function () { $(this).attr('src', './images/avail_hover.png'}); } it still isnt working. I orig. had it set as src. but nothing seemed to be working then so i messed around and changed it to img src. any other ideas as to why it might not be working? On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote: $(this).attr({'img src' : './images/avail_hover.png'}); there is no img src attr, but there is src, so $(this).attr('src', './images/avail_hover.png'); and there's a second event to hook on the .hover event is when you mouse off, so use that event to revert back to whatever image was there On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote: In my footer I have a sign where I want it to say one thing regularly, and then when someone hovers, i want it to say sometyhing else. I basically made 2 images, and I just want to switch images on the hover. here is my code I used and its not working.: $(#footer #footer-contain #availability img).hover(function () { $(this).attr({'img src' : './images/avail_hover.png'}); } can anyone help me out with what I need to do?
[jQuery] Re: img src replacement
it changes it http://docs.jquery.com/Attributes/attr#keyvalue attr( key, value ) Set a single property to a value, on all matched elements going a different direction isn't the solution, something else is wrong. and your current one of img src as an attribute name is not going to work, it's not the name of the property you need to set here's a super quick and working example http://jsbin.com/aluhe/edit (code) http://jsbin.com/aluhe (run) On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote: does the attr function change the img source or does it add it in? Perhaps I need a different function to do it? is that possible? i am going to try to add a the remove attr function first, then run the current one and see if that works... On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote: Perhaps the path to the image itself isn't ./images ? Other than that,maybe some more code to show or better yet a live, non- working page.. Rest assured the hover event does work, and the way to set an img's source is $(this).attr(src) ... there's something else not seen/talked-about/thought-of that is the issue :-) On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote: I have it now set up like this: $(#footer #footer-contain #availability img).hover(function () { $(this).attr('src', './images/avail_hover.png'}); } it still isnt working. I orig. had it set as src. but nothing seemed to be working then so i messed around and changed it to img src. any other ideas as to why it might not be working? On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote: $(this).attr({'img src' : './images/avail_hover.png'}); there is no img src attr, but there is src, so $(this).attr('src', './images/avail_hover.png'); and there's a second event to hook on the .hover event is when you mouse off, so use that event to revert back to whatever image was there On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote: In my footer I have a sign where I want it to say one thing regularly, and then when someone hovers, i want it to say sometyhing else. I basically made 2 images, and I just want to switch images on the hover. here is my code I used and its not working.: $(#footer #footer-contain #availability img).hover(function () { $(this).attr({'img src' : './images/avail_hover.png'}); } can anyone help me out with what I need to do?
[jQuery] Re: img src replacement
ready to know what a major problem is?? your script.js is: $(document).ready(function() { // do stuff when DOM is ready $(#footer #footer-contain #availability img).hover( function() { $(this).attr(src, ./images/avail_hover.png); }, function() { $(this).attr(src, ./images/availab.png); } ); }); }); There's an extra }); causing a syntax error, stopping JavaScript dead in it's tracks.. Firebug pointed that out on page load On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote: I put up my site quickly here:http://www.glenhealy.com/ the image should be at the bottom in the footer, if you can view the code, maybe you can see what the deal is? i used the exact code used in the example so there has to be a file issue On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com wrote: it changes it http://docs.jquery.com/Attributes/attr#keyvalue attr( key, value ) Set a single property to a value, on all matched elements going a different direction isn't the solution, something else is wrong. and your current one of img src as an attribute name is not going to work, it's not the name of the property you need to set here's a super quick and working example http://jsbin.com/aluhe/edit(code) http://jsbin.com/aluhe(run) On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote: does the attr function change the img source or does it add it in? Perhaps I need a different function to do it? is that possible? i am going to try to add a the remove attr function first, then run the current one and see if that works... On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote: Perhaps the path to the image itself isn't ./images ? Other than that,maybe some more code to show or better yet a live, non- working page.. Rest assured the hover event does work, and the way to set an img's source is $(this).attr(src) ... there's something else not seen/talked-about/thought-of that is the issue :-) On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote: I have it now set up like this: $(#footer #footer-contain #availability img).hover(function () { $(this).attr('src', './images/avail_hover.png'}); } it still isnt working. I orig. had it set as src. but nothing seemed to be working then so i messed around and changed it to img src. any other ideas as to why it might not be working? On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote: $(this).attr({'img src' : './images/avail_hover.png'}); there is no img src attr, but there is src, so $(this).attr('src', './images/avail_hover.png'); and there's a second event to hook on the .hover event is when you mouse off, so use that event to revert back to whatever image was there On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote: In my footer I have a sign where I want it to say one thing regularly, and then when someone hovers, i want it to say sometyhing else. I basically made 2 images, and I just want to switch images on the hover. here is my code I used and its not working.: $(#footer #footer-contain #availability img).hover(function () { $(this).attr({'img src' : './images/avail_hover.png'}); } can anyone help me out with what I need to do?
[jQuery] Re: img src replacement
here's your exact code working http://jsbin.com/aguji/edit http://jsbin.com/aguji On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote: ready to know what a major problem is?? your script.js is: $(document).ready(function() { // do stuff when DOM is ready $(#footer #footer-contain #availability img).hover( function() { $(this).attr(src, ./images/avail_hover.png); }, function() { $(this).attr(src, ./images/availab.png); } ); }); }); There's an extra }); causing a syntax error, stopping JavaScript dead in it's tracks.. Firebug pointed that out on page load On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote: I put up my site quickly here:http://www.glenhealy.com/ the image should be at the bottom in the footer, if you can view the code, maybe you can see what the deal is? i used the exact code used in the example so there has to be a file issue On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com wrote: it changes it http://docs.jquery.com/Attributes/attr#keyvalue attr( key, value ) Set a single property to a value, on all matched elements going a different direction isn't the solution, something else is wrong. and your current one of img src as an attribute name is not going to work, it's not the name of the property you need to set here's a super quick and working example http://jsbin.com/aluhe/edit(code) http://jsbin.com/aluhe(run) On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote: does the attr function change the img source or does it add it in? Perhaps I need a different function to do it? is that possible? i am going to try to add a the remove attr function first, then run the current one and see if that works... On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote: Perhaps the path to the image itself isn't ./images ? Other than that,maybe some more code to show or better yet a live, non- working page.. Rest assured the hover event does work, and the way to set an img's source is $(this).attr(src) ... there's something else not seen/talked-about/thought-of that is the issue :-) On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote: I have it now set up like this: $(#footer #footer-contain #availability img).hover(function () { $(this).attr('src', './images/avail_hover.png'}); } it still isnt working. I orig. had it set as src. but nothing seemed to be working then so i messed around and changed it to img src. any other ideas as to why it might not be working? On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote: $(this).attr({'img src' : './images/avail_hover.png'}); there is no img src attr, but there is src, so $(this).attr('src', './images/avail_hover.png'); and there's a second event to hook on the .hover event is when you mouse off, so use that event to revert back to whatever image was there On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote: In my footer I have a sign where I want it to say one thing regularly, and then when someone hovers, i want it to say sometyhing else. I basically made 2 images, and I just want to switch images on the hover. here is my code I used and its not working.: $(#footer #footer-contain #availability img).hover(function () { $(this).attr({'img src' : './images/avail_hover.png'}); } can anyone help me out with what I need to do?
[jQuery] Re: img src replacement
like so? http://jsbin.com/amuma3/edit http://jsbin.com/amuma3 On Jan 7, 1:45 pm, Glen_H glen.f.he...@gmail.com wrote: Here is another question if you have the time, now that the image changes on hover, can I add a fade animation so that it fades to the hover image as opposed to switching back and forth? or would I have to create a whole new function? On Jan 7, 1:38 pm, MorningZ morni...@gmail.com wrote: here's your exact code working http://jsbin.com/aguji/edithttp://jsbin.com/aguji On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote: ready to know what a major problem is?? your script.js is: $(document).ready(function() { // do stuff when DOM is ready $(#footer #footer-contain #availability img).hover( function() { $(this).attr(src, ./images/avail_hover.png); }, function() { $(this).attr(src, ./images/availab.png); } ); }); }); There's an extra }); causing a syntax error, stopping JavaScript dead in it's tracks.. Firebug pointed that out on page load On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote: I put up my site quickly here:http://www.glenhealy.com/ the image should be at the bottom in the footer, if you can view the code, maybe you can see what the deal is? i used the exact code used in the example so there has to be a file issue On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com wrote: it changes it http://docs.jquery.com/Attributes/attr#keyvalue attr( key, value ) Set a single property to a value, on all matched elements going a different direction isn't the solution, something else is wrong. and your current one of img src as an attribute name is not going to work, it's not the name of the property you need to set here's a super quick and working example http://jsbin.com/aluhe/edit(code) http://jsbin.com/aluhe(run) On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote: does the attr function change the img source or does it add it in? Perhaps I need a different function to do it? is that possible? i am going to try to add a the remove attr function first, then run the current one and see if that works... On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote: Perhaps the path to the image itself isn't ./images ? Other than that,maybe some more code to show or better yet a live, non- working page.. Rest assured the hover event does work, and the way to set an img's source is $(this).attr(src) ... there's something else not seen/talked-about/thought-of that is the issue :-) On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote: I have it now set up like this: $(#footer #footer-contain #availability img).hover(function () { $(this).attr('src', './images/avail_hover.png'}); } it still isnt working. I orig. had it set as src. but nothing seemed to be working then so i messed around and changed it to img src. any other ideas as to why it might not be working? On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote: $(this).attr({'img src' : './images/avail_hover.png'}); there is no img src attr, but there is src, so $(this).attr('src', './images/avail_hover.png'); and there's a second event to hook on the .hover event is when you mouse off, so use that event to revert back to whatever image was there On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote: In my footer I have a sign where I want it to say one thing regularly, and then when someone hovers, i want it to say sometyhing else. I basically made 2 images, and I just want to switch images on the hover. here is my code I used and its not working.: $(#footer #footer-contain #availability img).hover(function () { $(this).attr({'img src' : './images/avail_hover.png'}); } can anyone help me out with what I need to do?
[jQuery] Re: img src replacement
I'd suggest reading through this blog post: http://jqueryfordesigners.com/image-cross-fade-transition/ On Jan 7, 2:14 pm, Glen Healy glen.f.he...@gmail.com wrote: no more like a slowdown in the transition between the images. hope that makes sense. lol. Like if you move over it now really fast it is twitchy im thinking what if it were possible to add like a ms or 2 to the actual hover effect and they will blend more. instead of fading out they fade into one another i guess is what im trying to say On Thu, Jan 7, 2010 at 2:05 PM, MorningZ morni...@gmail.com wrote: like so? http://jsbin.com/amuma3/edit http://jsbin.com/amuma3 On Jan 7, 1:45 pm, Glen_H glen.f.he...@gmail.com wrote: Here is another question if you have the time, now that the image changes on hover, can I add a fade animation so that it fades to the hover image as opposed to switching back and forth? or would I have to create a whole new function? On Jan 7, 1:38 pm, MorningZ morni...@gmail.com wrote: here's your exact code working http://jsbin.com/aguji/edithttp://jsbin.com/aguji On Jan 7, 1:34 pm, MorningZ morni...@gmail.com wrote: ready to know what a major problem is?? your script.js is: $(document).ready(function() { // do stuff when DOM is ready $(#footer #footer-contain #availability img).hover( function() { $(this).attr(src, ./images/avail_hover.png); }, function() { $(this).attr(src, ./images/availab.png); } ); }); }); There's an extra }); causing a syntax error, stopping JavaScript dead in it's tracks.. Firebug pointed that out on page load On Jan 7, 12:56 pm, Glen Healy glen.f.he...@gmail.com wrote: I put up my site quickly here:http://www.glenhealy.com/ the image should be at the bottom in the footer, if you can view the code, maybe you can see what the deal is? i used the exact code used in the example so there has to be a file issue On Thu, Jan 7, 2010 at 12:44 PM, MorningZ morni...@gmail.com wrote: it changes it http://docs.jquery.com/Attributes/attr#keyvalue attr( key, value ) Set a single property to a value, on all matched elements going a different direction isn't the solution, something else is wrong. and your current one of img src as an attribute name is not going to work, it's not the name of the property you need to set here's a super quick and working example http://jsbin.com/aluhe/edit(code)http://jsbin.com/aluhe/edit%28code%29 http://jsbin.com/aluhe(run) http://jsbin.com/aluhe%28run%29 On Jan 7, 12:32 pm, Glen_H glen.f.he...@gmail.com wrote: does the attr function change the img source or does it add it in? Perhaps I need a different function to do it? is that possible? i am going to try to add a the remove attr function first, then run the current one and see if that works... On Jan 7, 12:25 pm, MorningZ morni...@gmail.com wrote: Perhaps the path to the image itself isn't ./images ? Other than that,maybe some more code to show or better yet a live, non- working page.. Rest assured the hover event does work, and the way to set an img's source is $(this).attr(src) ... there's something else not seen/talked-about/thought-of that is the issue :-) On Jan 7, 12:10 pm, Glen_H glen.f.he...@gmail.com wrote: I have it now set up like this: $(#footer #footer-contain #availability img).hover(function () { $(this).attr('src', './images/avail_hover.png'}); } it still isnt working. I orig. had it set as src. but nothing seemed to be working then so i messed around and changed it to img src. any other ideas as to why it might not be working? On Jan 7, 11:41 am, MorningZ morni...@gmail.com wrote: $(this).attr({'img src' : './images/avail_hover.png'}); there is no img src attr, but there is src, so $(this).attr('src', './images/avail_hover.png'); and there's a second event to hook on the .hover event is when you mouse off, so use that event to revert back to whatever image was there On Jan 7, 11:02 am, Glen_H glen.f.he...@gmail.com wrote: In my footer I have a sign where I want it to say one thing regularly, and then when someone hovers, i want it to say sometyhing else. I basically made 2 images, and I just want to switch images on the hover. here is my code I used and its not working.: $(#footer #footer-contain #availability img).hover
[jQuery] Re: iTunes Style Slider
it's been coded in jQuery before, like http://www.blarnee.com/projects/coverflow/ i recall that one of the people on the jQuery UI team was messing around with that effect as well On Jan 5, 10:22 pm, Matt Quackenbush quackfu...@gmail.com wrote: Hello, I found an iTunes style slider/rotator that has been done in blasphemyMooTools/blasphemy, demoed here:http://www.outcut.de/MooFlow/example-ajax.html. I was wondering if either a) such a thing already existed in a jQuery plugin, or b) if there was a jQuery master who could port it in quick fashion? If b), please contact me off-list and let me know how much you would charge and what the turnaround time would be. :-) Thanks in advance!
[jQuery] Re: Expectetd identifier, string on number
Wonder why that is? https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Reserved_Words it's just that browsers other than IE handle it (much) more gracefully :-) Also just a quick tip on your code in general... if you know the ID of something, then use *just* the ID for the selector... so in your code jQuery(select#article_is_in_1); should be jQuery(#article_is_in_1) the first is slower because it is like find all select objects on the page, then find the one with this ID the second is faster because it'll use document.getElementById, which is very fast :-) if you want to read more: http://www.componenthouse.com/article-19 All the multiple .hide() calls could be cleaned up too... even if it's just a loop if it has to be 2 through 14 for (var j=2; j = 14) { jQuery('#article' + j).hide(); } On Jan 6, 6:47 am, youradds andy.ne...@gmail.com wrote: Ah never mind - found it: do: wiki_ajax, For some reason it doesn't like do: , so I renamed to wiki_do, and its fine now Wonder why that is? TIA Andy On Jan 6, 11:46 am, youradds andy.ne...@gmail.com wrote: Hi, Got a bit of a weird issue in IE 8 with this code: jQuery.getJSON(/v.f, { do: wiki_ajax, id: jQuery (this).val(), field: 1 }, function(j){ The whole function is: jQuery.noConflict(); jQuery(function(){ jQuery(select#article_is_in_1).change(function(){ jQuery.getJSON(/v.f, { do: wiki_ajax, id: jQuery (this).val(), field: 1 }, function(j){ clear_further_up(2); jQuery('#article2').hide(); jQuery('#article3').hide(); jQuery('#article4').hide(); jQuery('#article5').hide(); jQuery('#article6').hide(); jQuery('#article7').hide(); jQuery('#article8').hide(); jQuery('#article9').hide(); jQuery('#article10').hide(); jQuery('#article11').hide(); jQuery('#article12').hide(); jQuery('#article13').hide(); jQuery('#article14').hide(); ; var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j [i].optionValue + '' + j[i].optionDisplay + '/option'; } jQuery(#article_is_in_2).html(options); jQuery('#article_is_in_2 option:first').attr ('selected', 'selected'); if (j.length 1) { jQuery('#article2').show(); } }) }); }); Can anyone suggest what is wrong with it? Works perfectly fine in FF and Chrome :/ TIA Andy
[jQuery] Re: ajax image
I want all my ajax calls to run through the same ajax function What same ajax function? On Jan 6, 10:29 am, Mean Mike mcgra...@gmail.com wrote: ok so I figured out that you can put in image in your page using .load (imageloader.php) but is there a way to load an image using regular ajax call . alittle more explanation of what I'm trying to do in my php I use imagejpeg function which outputs the image using gd great! and in my html i use to just go img src=imageloader.php? dir=directoryname=filename / and that worked except now I don't want to pass that info in the query string I want to post the info AND I want all my ajax calls to run through the same ajax function which is why I don't want to use .load any thoughts or suggestions mean mike
[jQuery] Re: ajax image
So you are trying to use jQuery's .load() functionality with an actual image (i assume that your php sets the content type to image/ jpeg, image/gif, etc and writes out the actual binary image data) ? that's not going to work, as the .load() loads the result of the Ajax call into the innerHtml of DOM object I don't know though, you're talking same function but have posted about three different functions so far, $.ajax, .load, and your custom function but bottom line is, the $.ajax call which ultimately gets called wouldn't be a replacement for img src=your.php /, *unless* you wanted to use data url vales as image sources (like: http://www.websiteoptimization.com/speed/tweak/inline-images/), but the problem with that, like almost all cool ideas like that link shows, is it doesn't work with IE On Jan 6, 10:48 am, Mean Mike mcgra...@gmail.com wrote: basically all ajax calls go through $.ajax({.}); I made a function that gets passed all the parameters that I want in the ajax call oddly enough i can't get load to work right either i just get Array returned On Jan 6, 10:33 am, MorningZ morni...@gmail.com wrote: I want all my ajax calls to run through the same ajax function What same ajax function? On Jan 6, 10:29 am, Mean Mike mcgra...@gmail.com wrote: ok so I figured out that you can put in image in your page using .load (imageloader.php) but is there a way to load an image using regular ajax call . alittle more explanation of what I'm trying to do in my php I use imagejpeg function which outputs the image using gd great! and in my html i use to just go img src=imageloader.php? dir=directoryname=filename / and that worked except now I don't want to pass that info in the query string I want to post the info AND I want all my ajax calls to run through the same ajax function which is why I don't want to use .load any thoughts or suggestions mean mike
[jQuery] Re: next release?
A post from just 2 days ago :-) http://groups.google.com/group/jquery-en/browse_thread/thread/a9fcfc8e8deb0106?hl=en# On Jan 6, 12:47 pm, johnantoni indieh...@gmail.com wrote: hi, any idea when the next version of jQuery is to be released?
[jQuery] Re: Firebug gives a $ is not defined error
FireBug (http://www.getfirebug.com) would be a huge help for you to find out why On Jan 6, 11:31 pm, elvis_wu w.s.q...@gmail.com wrote: The same pages could be run correctly on both IE and Firefox untill yesterday. Now on IE they can still run normally, but on Firefox I got a $ is not defined error. I didn't change the reference to the jquery library in these pages and neither move the jquery library. I'm really confused. Could any one tell me why? -- View this message in context:http://old.nabble.com/Firebug-gives-a-%22%24-is-not-defined%22-error-... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: New to JS and jQuery
You should pay attention to your selectors :) you have $('baritem').click(function() that looks for baritem DOM objects but $('#baritem').click(function() will find div id=baritem On Jan 5, 2:41 pm, Valerij valeri...@gmail.com wrote: This still wont work.. I've even tried copy your example character by character and it still gives nothing.. I'm using this code onhttp://ferok.com/labs/test.htmlat the bottom bar, try clicking the My Account and the menu wont pop up. I had this working before, but I didn't have this dynamic code which I can use to open more than just 1 tab. The CSS: #stuff_menu {background-color:#E8E8E8;border: 1px solid #66;bottom: 22px;display:none;left:0px;padding:5px 5px 1px 5px;position: absolute;width:200px;} On Jan 5, 5:03 pm, brian zijn.digi...@gmail.com wrote: That works for me but I do see how this can be refactored: a id=stuff class=baritem href=#stuff_menuMy Account/a div id=stuff_menu class=SomeClass a href=##My Account/a a href=##More stuff/a a href=##Here is a menu item/a a href=##Here is a menu item/a a href=##Here is a menu item/a a href=##Here is a menu item/a /div Notice that I've changed the IDs so that the DIV has the link ID plus some other string, rather than the other way around. Also, I've added a class to the DIV to make it easier to set styles. This isn't strictly necessary. $(function() { /* set up the onclick handler for all links on page load */ $('.baritem').click(function() { $('#' + this.id + '_menu').toggle(); return false; }); }); On Mon, Jan 4, 2010 at 4:01 PM, Valerij valeri...@gmail.com wrote: Hey guys, I'm trying to create 1 really simple function but it just doesn't work! function showMenu(menu) { var menuid = $( #+menu ); var menuRoot = $( #+menu+-root ); menuid.toggle(); menuRoot.blur(); } What this suppose to do is when you click a link, it will change settings of a specific div to visible The HTML: a id=stuff-root class=baritem href=javascript:void(0) onclick=showMenu('stuff');My Account/a div id=stuff a href=##My Account/a a href=##More stuff/a a href=##Here is a menu item/a a href=##Here is a menu item/a a href=##Here is a menu item/a a href=##Here is a menu item/a /div Why doesn't this work? What am I doing wrong.. When I alert this, I get the correct div ids?
[jQuery] Re: Jquery color animation problem
I just went through looking for color animation as well this plugin http://plugins.jquery.com/project/color did the trick.. works great On Jan 5, 3:43 am, Md. Ali Ahsan Rana ranacser...@gmail.com wrote: I am trying to do it: $(this).animate({opacity:1},700); it looks fine in firefox, but the texts getting very odd look in ie 6 and ie 7. Is there any way to fix it? Also, i trie to change color like $(this).animate({color:#FF},700); and its not working. Please help... --http://ranacseruet.blogspot.com/
[jQuery] Re: New to JS and jQuery
I have $('.baritem').. No, no you don't right now on the URL http://ferok.com/labs/test.html and the included js file http://ferok.com/labs/global.js you have $('baritem').click(function() i just copied and pasted that right from the JavaScript include file just like i did on my last post :-) fix the selector and then go from there As said, Im new to jQuery so I don't know.. All I wanna do is having this script being able to pop up (like on facebook) more than just 1 box (Depending on which button you click, like: IF you click on a button with ID of menu it opens menu_menu if you click stuff if opens menu_stuff etc.. and I cant set it to just 1 ID cause then this wont work dynamicly eg. I wont be able to run more than just 1 box with this script as I cant set all the buttons to the same ID? Brian got the idea, just that the script doesn't work. On Jan 5, 9:14 pm, MorningZ morni...@gmail.com wrote: You should pay attention to your selectors :) you have $('baritem').click(function() that looks for baritem DOM objects but $('#baritem').click(function() will find div id=baritem On Jan 5, 2:41 pm, Valerij valeri...@gmail.com wrote: This still wont work.. I've even tried copy your example character by character and it still gives nothing.. I'm using this code onhttp://ferok.com/labs/test.htmlatthebottom bar, try clicking the My Account and the menu wont pop up. I had this working before, but I didn't have this dynamic code which I can use to open more than just 1 tab. The CSS: #stuff_menu {background-color:#E8E8E8;border: 1px solid #66;bottom: 22px;display:none;left:0px;padding:5px 5px 1px 5px;position: absolute;width:200px;} On Jan 5, 5:03 pm, brian zijn.digi...@gmail.com wrote: That works for me but I do see how this can be refactored: a id=stuff class=baritem href=#stuff_menuMy Account/a div id=stuff_menu class=SomeClass a href=##My Account/a a href=##More stuff/a a href=##Here is a menu item/a a href=##Here is a menu item/a a href=##Here is a menu item/a a href=##Here is a menu item/a /div Notice that I've changed the IDs so that the DIV has the link ID plus some other string, rather than the other way around. Also, I've added a class to the DIV to make it easier to set styles. This isn't strictly necessary. $(function() { /* set up the onclick handler for all links on page load */ $('.baritem').click(function() { $('#' + this.id + '_menu').toggle(); return false; }); }); On Mon, Jan 4, 2010 at 4:01 PM, Valerij valeri...@gmail.com wrote: Hey guys, I'm trying to create 1 really simple function but it just doesn't work! function showMenu(menu) { var menuid = $( #+menu ); var menuRoot = $( #+menu+-root ); menuid.toggle(); menuRoot.blur(); } What this suppose to do is when you click a link, it will change settings of a specific div to visible The HTML: a id=stuff-root class=baritem href=javascript:void(0) onclick=showMenu('stuff');My Account/a div id=stuff a href=##My Account/a a href=##More stuff/a a href=##Here is a menu item/a a href=##Here is a menu item/a a href=##Here is a menu item/a a href=##Here is a menu item/a /div Why doesn't this work? What am I doing wrong.. When I alert this, I get the correct div ids?
[jQuery] Re: How to check whether an element is bound to an event or not?
There is an DOM element, which is reloading(replaced by ajax response with same id/tag), then the event isn't no more bounded. I want it to be bounded all the time instead of all the overhead of binding/unbinding/looking-to-do-either, why not: a) just replace the contents of the DOM object b) wrap wherever you inject the ajax response with another uniquely identifiable DOM object and wire the event to that? then the binding is done once and it doesn't matter if the Ajax call is never made or is made 100 times, the event isn't going anywhere :-) On Jan 4, 8:19 am, Karl Swedberg k...@englishrules.com wrote: In jQuery 1.3.x, .live() only works for a subset of event types. jQuery 1.4 extends support to all event types: Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup Currently not supported: blur, focus, mouseenter, mouseleave, change, submit http://docs.jquery.com/Events/live#typefn Kudos for rolling your own solution for 1.3.x with the onfocusin event. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jan 3, 2010, at 5:31 AM, Md. Ali Ahsan Rana wrote: I don't know about this much. But, just a while ago, i wa having problem binding focus event with live() method. Just solved it by the following code that i found somewhere on internet: (function(){ var special = jQuery.event.special, uid1 = 'D' + (+new Date()), uid2 = 'D' + (+new Date() + 1); jQuery.event.special.focus = { setup: function() { var _self = this, handler = function(e) { e = jQuery.event.fix(e); e.type = 'focus'; if (_self === document) { jQuery.event.handle.call(_self, e); } }; jQuery(this).data(uid1, handler); if (_self === document) { /* Must be live() */ if (_self.addEventListener) { _self.addEventListener('focus', handler, true); } else { _self.attachEvent('onfocusin', handler); } } else { return false; } }, teardown: function() { var handler = jQuery(this).data(uid1); if (this === document) { if (this.removeEventListener) { this.removeEventListener('focus', handler, true); } else { this.detachEvent('onfocusin', handler); } } } }; jQuery.event.special.blur = { setup: function() { var _self = this, handler = function(e) { e = jQuery.event.fix(e); e.type = 'blur'; if (_self === document) { jQuery.event.handle.call(_self, e); } }; jQuery(this).data(uid2, handler); if (_self === document) { /* Must be live() */ if (_self.addEventListener) { _self.addEventListener('blur', handler, true); } else { _self.attachEvent('onfocusout', handler); } } else { return false; } }, teardown: function() { var handler = jQuery(this).data(uid2); if (this === document) { if (this.removeEventListener) { this.removeEventListener('blur', handler, true); } else { this.detachEvent('onfocusout', handler); } } } }; })(); -- http://ranacseruet.blogspot.com/
[jQuery] Re: jquery.js and jquery-1.2.6.pack.js conflict
how can i get the full version of files? http://code.google.com/apis/ajaxlibs/documentation/index.html#jquery
[jQuery] Re: Does anybody know when jquery 1.3.3 or 1.4 will be released?
January 14th is only 10 days away. and yet, there's no official announcement anywhere about it..i wouldn't bet on it.. as it stands right this second, Alpha 2 is the latest official announced version: http://blog.jquery.com/2009/12/18/jquery-14-alpha-2-released/ chances that it will go through a beta process and be released as ready for production use in a 10 day period doesn't seem likely. and take it from people like me who on Day # 1 use the latest and greatest. plan on waiting a little bit, even a day or two i recall on the last two big releases (1.2.4 and 1.3) that they were quickly updated versions addressing some major issue... Hope it will be on time. anything you are coding in particular that requires 1.4 ? if that version is absolutely necessary, did you create a ticket when that stack overflow error you hit, is there an update for it by someone on the jQuery team? are you using the nightly builds as suggested above to see if it has been fixed along the way? Lots of things to consider. we all want the latest and greatest, but it's got to be solid :-)
[jQuery] Re: jquery UI sortable, how can i get the text of the li that i just moved ?
i tried: $(ui.item).text() but i get an ui is not defined error that would potentially be a valid way to do it, but without any of your code to work with, it's hard to help with that
[jQuery] Re: Accessing REST API via JQUERY?
$.getJSON gets, well, JSON data... it doesn't handle XML data you can use the generic $.ajax method (which $.getJSON ultimately uses anyways, but just with the tpye set to JSON) and handle the data in the callback event On Jan 4, 4:06 pm, Simon simon@rewardstream.com wrote: Hi there. I'd like to use jQuery to access a remote website that has a REST API which returns XML data. Should I be able to use the jQuery.getJSON request to do it or is there another command since it's returning XML. Example Request Details (HTTP GET): https://{username}:{passwo...@api.opsourcecloud.net/oec/0.9/myaccount Example Response Details: ?xml version=1.0 encoding=UTF-8 standalone=yes? ns3:Account xmlns:ns2=http://oec.api.opsource.net/schemas/ organization .. ns3:userNamerdyer/ns3:userName ns3:fullNameJoe Public/ns3:fullName ns3:firstNameJoe/ns3:firstName ns3:lastNamePublic/ns3:lastName ns3:emailAddressjpublic24...@pop.net/ns3:emailAddress ns3:orgId1831c1a9-9c03-44df-a5a4-f2a4662d6bde/ns3:orgId ns3:roles ns3:role ns3:nameprimary administrator/ns3:name /ns3:role /ns3:roles /ns3:Account
[jQuery] Re: How to retrieve the selected cells
1) How do I know if a cell is selected? Is there is is_selected( ) function in jQuery? There's the :selected selector, but it's for valid form fields, not table cells... in your case, $(table td.sel) would give you all selected table cells I have no idea what your PHP looks like, but one way to gather the data could be: http://jsbin.com/areti/edit but that all depends on what you are looking for (just selected cell values? do you need position on the grid? something else?) On Jan 4, 10:11 pm, MT matt.tha...@gmail.com wrote: Hi all, I am new to jQuery and I would like to process a matrix operation using PHP. The front-end code is done bellow, its a 3x3 table. the user could select/deselect individual cells of the table and click the button that calls a PHP script that will run some function. 1) How do I know if a cell is selected? Is there is is_selected( ) function in jQuery? 2) Would it be possible to send a 3x3 array to my PHP script? Please provide me with any info on this. Thanks! MT My current test code. htmlheadtitleTest/title script type='text/javascript' src='http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js'/ script script type=text/javascript $(document).ready(function() { $(td).toggle( function () { $(this).addClass(sel); }, function () { $(this).removeClass(sel); } ); }); /script style .sel { background-color:red; } /style /headbody table border=5 cellspace=10 trtd1/tdtd2/tdtd3/td/tr trtd4/tdtd5/tdtd6/td/tr trtd7/tdtd8/tdtd9/td/tr /table buttonClick here to process the selection with a php script/button /body/html
[jQuery] Re: Help needed with textarea.
The issue seems to be that you are thinking that the second for loop will run after the keypress event is called... *it's not*.. it will only be called on document.ready... I was going to use jsbin.com to work up an example for you, but i have absolutely no idea what the first for loop's purpose is, so unfortunately i cannot help further On Jan 2, 5:26 am, direheart direhe...@hotmail.com wrote: Im unable to store any values from the textarea input. When ever I run the for loop to retrieve the values from the array, it is displayed as undefined. I not sure how to solve that problem. Any help would be appreciated. $(document).ready(function(){ var choices = new Array(); var prev = 0; var nex; for(i = 0;i 10;i++) { $('#textarea1').bind('keypress', function(e) { if(e.keyCode==13){ nex = $('#textarea1').val().length; choices[i] = $('#textarea1').val().substring(prev,nex); prev = nex; } }); } for(i = 0;i choices.length;i++){ $(#div1).append(p + choices[i] + /p); } }); -- View this message in context:http://old.nabble.com/Help-needed-with-textarea.-tp26991838s27240p269... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jquery sortable question
jQuery core's method .index() would be a solution here's an example: http://jsbin.com/ozoda/edit On Jan 2, 12:17 am, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I'm using the sortable plugin with JQuery 1.3. After a list item has been moved to a new place, how do you get the new list item position -- i.e. it's now the 1st, 2nd, 3rd ... item in the list as opposed to its position on the screen? Here's how I'm declaring my sortable list ... $(#sortable).sortable({ revert: true, handle : '.adminPrinterHeader', update : function (event, ui) { /* What goes here? */ } }); // Thanks, - Dave
[jQuery] Re: Formatting long chains of jQuery code
I would guess preferred = however someone wants to do it as long as it works what you have is perfectly fine.. and bonus points for it working :-) On Jan 2, 9:03 pm, Šime Vidas sime.vi...@gmail.com wrote: Is there a prefered way of formatting jQuery code when you have 5 or more chained methods? I came up with this...http://vidasp.net/jquery-example6.html (look at the code at the bottom of the source) ... how do you format it?
[jQuery] Re: How do I extract this value?
var hit = $(#myid).find(a).attr(href).match(/^.+\((\d+)\)$/); if (hit hit.length == 2) { // hit[1] = 1234 in the example you provided } else { // didn't find the value } On Jan 2, 9:13 pm, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I am using JQuery 1.3. I have this basic structure in my HTML ... li id=myid ... a class=edit href=javascript:edit(1234) ... /a ... /li How do I extract the 1234 from HTML assuming I know the id of the li element? Thanks, - Dave ps - I know its bad practice to have the javascript function in there, but sadly this is code I inherited and I can't change the href at this point.
[jQuery] Re: jquery.js and jquery-1.2.6.pack.js conflict
also, while debugging/diagnosing: use the *full* versions of the files, do not use packed or minified, as they complicated matters a lot
[jQuery] Re: jquery.js and jquery-1.2.6.pack.js conflict
I did tried to remove one library but if i remove jquery-1.2.6.pack.js then image gallery doesnot work and if i remove jquery.js menus stop working Well, maybe instead of pointing fingers to jQuery as the issue, how about looking into fixing either of your code, the image gallery would be the smarter choice since fixing that will allow you to move to the newest version of the jQuery framework... this is an excellent article diagnosing the three biggest issues going from 1.2.6 to 1.3.x http://www.learningjquery.com/2009/03/3-quick-steps-for-a-painless-upgrade-to-jquery-13 that's where I would start :-) On Jan 1, 5:51 am, Mr.Aaqib mr.aa...@gmail.com wrote: Thnx for your reply. I did tried to remove one library but if i remove jquery-1.2.6.pack.js then image gallery doesnot work and if i remove jquery.js menus stop working. Now i tried prototype image gallery and same problem. when i include prorotype .js gallery menus stop working and if include jquery.js file for menus image gallery does not work. Any Idea?? On Dec 31 2009, 10:07 pm, brian zijn.digi...@gmail.com wrote: You should only load one of those files. The version included with jCarousel is there as a convenience. It's not necessary to use it if you already are loading jQuery. It's likely the unpacked version is newer, anyway. On Thu, Dec 31, 2009 at 7:21 AM, Mr.Aaqib mr.aa...@gmail.com wrote: Hi, Recently i created menu and image gallery. I used jquery.js for menus and for image gallery i used jquery-1.2.6.pack.js as provided by carousels galleries. Now both of them does not work at same time. If i include both file image gallery script generates error message and if i remove the menus jquery.php file menus does not work but image gallery works as expected. I dont know whether its version conflict or something else. Any help will be highly appreciated. Regards Aaqib Iqbal
[jQuery] Re: Toggle link Needs to Be UNDERNEATH!!!
There's multiple issues with the code quoted below... 1) you have this selector: $('[class^=toggle-item]) but there is no sign of anything in the HTML shows that has any class name that starts with toggle-item 2) related to #1, the attribute class is *not* a simple string to all browsers, you cannot, well should not, do that selector example: http://jsbin.com/azeve/edit (code) http://jsbin.com/azeve (run) works in FF because it will treat it as a string, but IE doesn't (and One and Two don't get colored yellow I'd guess by your latest code using className in there that you ran across that fact You're best off to use a common class across all togglable items and if you need to differentiate from each other, use the div's id (that's why it exists) then you can say $(.toggle-item) and that will work cross browser and consistantly On Dec 30, 10:43 am, Erik eriks...@mac.com wrote: Not sure where, but this is it... Still doesn't work. !DOCTYPE html html dir=ltr lang=en-CA script src=/src/js/jquery/core/jquery-1.3.2.min.js type=text/ javascript/script script type=text/javascript $(document).ready(function() { $('[class^=toggle-item]').hide(); $('[class^=link]').click(function() { var $this = $(this); var x = $this.attr(className); $('.toggle-item-' + x).toggle(); return false;}); }); /script body div class=SomeOtherClass foo /div a href=# class=SomeClassMore Details/a sasasa div class=SomeOtherClass foo /div a href=# class=SomeClassMore Details/a /body /html
[jQuery] Re: If radio button checked - do stuff
i think the problem is with your selector (and this is above and beyond the psuedo error $(form input[name=setting1]:radio).filter(':checked').click that will only bind the click event to checked radio buttons, which on page load wouldn't be the desired behaviour I've fallen for event delegation lately, and taking your HTML, this would work nicely :-) super quick example using your HTML http://jsbin.com/ajaju/edit (code) http://jsbin.com/ajaju (run) On Dec 30, 11:03 am, Silver 8800gt...@gmail.com wrote: Hey all, I think I'm close, but I keep getting the errors ( Unkonw pseude-class or pseude-elmemt 'radio'). All I need is if the user clicks a radio button for the right if statement to run and send the variables to the dq_process php file. $(form input[name=setting1]:radio).filter(':checked').click(function () { if ( $(this).val() == 'home_fy' ) $.post(dq_process.php, { q: 1, r: 13300 } ); else if ( $(this).val() == 'home_by' ) $.post(dq_process.php, { q: 1, r: 24400 } ); else $.post(dq_process.php, { q: 1, r: 0 } ); }); ol class=answers liinput type=radio name=setting1 value=home_fy / Home – front yard/li liinput type=radio name=setting1 value=home_by / Home – back yard/li liinput type=radio name=setting1 value=cottage / Cottage/li /ol Any help would be great. Thanks
[jQuery] Re: opera and :visible selector
I'm not so sure the blanket statement :visible doesn't work in Opera, as Opera 10 runs the jQuery Docs example just fine: http://docs.jquery.com/Selectors/visible Works fine for me anyways perhaps it's not selecting what you think it should be? and FF/ Chrome/IE compensate for it On Dec 30, 10:01 am, phatfish phatf...@gmail.com wrote: Hi all, Im using this code -- var uri = /generator/render?s=formo=image+$(#main- form :visible).serialize(); -- to select and then serialize only the visible fields in a form (i have hidden inputs i don't want sent in this ajax request). However Opera v10.10 it appears doesn't support the :visible selector (at least in jQuery) and gives the error Unknown pseudo class relating to the :visible selector. The value of the uri variable ends up with duplicate fields in the serialized string, messing up the request data. Caused it seems, by it not liking that selector. The code works fine in Firefox/Chrome/IE but not Opera. If i remove :visible and just use #main-form as the selector, it serializes the form correctly. So i'm sure the selector is the problem. If anyone knows an alternative way to make the selection so hidden fields aren't selected, that will work with Opera as well as the other browsers mentioned, that would be helpful. Thanks!
[jQuery] Re: Plugin Authoring and $.extend
anything that the docs doesn't explain properly? it pretty much combines two objects, saving the result in the object specified as the first parameter... in Mike's awesome article, he has default values but if the user passes in options, the .extend() method overwrites the defaults with what the user passed in if the second parameter of the .extend() has a same key as the first parameter, the second parameter wins here's a quick example: http://jsbin.com/itihe3/edit (code) http://jsbin.com/itihe3 (view) so in the first extend: $.extend(obj1, obj2); - obj1 and obj2 don't share any key names, so the result is all the keys names, obj1 is now 6 items long the second: $.extend(obj1, obj3); - obj3's key1 value overwrote what obj1 had (and again, obj1 is now storing this merging) the third: $.extend(obj1, obj3); - obj3's foo2 value overwrote what obj2 had (and now obj2 has the merged values) in the plugin article, and in many many plugins, you'll see that they take the result and assign it to another variable to keep the combined set inside the closure (I'm pretty sure, heh) that help? On Dec 30, 12:47 pm, T.J. Simmons theimmortal...@gmail.com wrote: Hi all, Got a quick question. I'm writing my second plugin following Mike Alsup's pattern (http://www.learningjquery.com/2007/10/a-plugin- development-pattern) and the only part that I have yet to wrap my head around is using $.extend().. I understand what it does, sorta, but not the why. I've read the documentation for $.extend and it doesn't seem to make much sense with the way it's used within that walkthrough, at least not to me. Is anyone able to put it in a more understandable way, other than what the documentation has? Thanks, T.J.
[jQuery] Re: Plugin Authoring and $.extend
oops.. that should say: the third: $.extend(obj2, obj3);
[jQuery] Re: opera and :visible selector
How about seeing if $(#main-form :input).filter(:visible).serialize() works across all browsers On Dec 30, 2:21 pm, phatfish phatf...@gmail.com wrote: On Dec 30, 5:50 pm, MorningZ morni...@gmail.com wrote: I'm not so sure the blanket statement :visible doesn't work in Opera, as Opera 10 runs the jQuery Docs example just fine: http://docs.jquery.com/Selectors/visible Works fine for me anyways perhaps it's not selecting what you think it should be? and FF/ Chrome/IE compensate for it OK i made a test case:http://gist.github.com/266301(that file along with jquery min) Firefox etc. output: /my/url?s=formo=imageinput1=input1input2=input2 Opera output: /my/url? s=formo=imageinput1=input1input2=input2hidden1=hidden1input1=input1input2=input2 Now i did notice that if you remove the fieldset tags, it works OK in Opera too. That appears to be the source of the problem. Any ideas, i rather like using a fieldset...
[jQuery] Re: autocomplete plugin not working in firefox
Do you have FireBug installed (you should!) to see if the plugin at least tries to make the request? http://www.getfirebug.com On Dec 30, 8:23 pm, mary ann marya...@gmail.com wrote: I'm using the autocomplete plugin. The following script works in IE, but doesn't work in Firefox. It doesn't appear that these are even being triggered. So when the page displays in Firefox, the searchStudents textbox has no autocomplete associated with it. $(document).ready(function() { $('#searchStudents').autocomplete('%=Url.Action(Students, Student)%', { dataType: 'json', parse: function(data) { var rows = new Array(); for (var i = 0; i data.length; i++) { rows[i] = { data: data[i], value: data [i].LastName, result: data[i].LastName }; } return rows; }, formatItem: function(row, i, n) { return row.LastName + ' - ' + row.UserId; }, width: 300, mustMatch: false, limit: 10 }); $('#searchStudents').result(function(event, data, formatted) { if (data) $(this).parent().next().find(input).val(data [UserId]); $('#Students).append('option value=' + data[UserId] + '' + data[LastName] + '/option '); }); $('#deleteStudents').click(function() { $('#Students :selected').each(function(i, selected) { $(selected).remove(); }); }); });
[jQuery] Re: jQuery suggestion
Writing the code that way is not only good for code completion/ suggestion but also good for syntax checking But it's also bad to repeat code which results in more weight which is exactly why code like that is written like so and people's need for speed is going to far outweight your need for IntelliJ's intellisense to work... not that i have one ounce of say in that, but after being on this Google Group for a while now, the core of jQuery is all about optimized base functionality (which the above code example does, as it takes care of two functions with one set of code) and lowest kb's possible (which not repeating code certainly helps!!) You could make your own functions that *will* show up in Intellisense but call the base functions, for instance... and note i have never done this myself, but i know it's possible: small and quick example: http://jsbin.com/ujiru (run) http://jsbin.com/ujiru/edit (code) and then your text editor should pick up your version of innerWidth and show it intellisense style, all without touching the core (or increasing it's size!) :-) On Dec 29, 11:54 am, Thai Dang Vu tdan...@gmail.com wrote: Thanks Scott for a reply. Is there any other place where I can talk to the jQuery team and hopefully persuade them to write this wonderful library in that regular way? Writing the code that way is not only good for code completion/suggestion but also good for syntax checking (esp. with a tool like Idea). On Mon, Dec 28, 2009 at 3:26 PM, Scott Sauyet scott.sau...@gmail.comwrote: On Dec 28, 2:55 pm, Thai Dang Vu tdan...@gmail.com wrote: I'm using IntelliJ Idea 9.0 which supports code completion/suggestion for javascript. It doesn't work with the innerHeight/Width because of this jQuery.fn[inner + name] = function(){ // [ ... ] Is there anyway to implement the innerHeight and innerWidth in a regular way? Of course it could be done in the regular way. But this is a means to keep the download size of the library small. There are numerous places in the codebase where similar tricks are employed. One consistent goal of the jQuery team has been to keep the library as lean as possible, and such tricks help, with practically no performance cost. I believe it would take a great deal of persuasion to convince the team that supporting code completion in this way is worth the additional weight of the download, but feel free to try... :-) -- Scott
[jQuery] jQuery in Action = $15 off today (12/28)
Just a heads up to people on this list Manning Publications is running a special of $15 off their books today only... one of those books is the excellent (I'd almost say *required*) read jQuery in Action: http://www.manning.com/bibeault/ Just enter dotd1228 in the Promotional Code box when you check out at manning.com. The $15 discount on any purchase expires at midnight ET (GMT - 5:00) tonight!
[jQuery] Re: ajax success event does not work
try also catching the error event and see what the problem is (which make no doubt about it, something is wrong with the response for jQuery to not go into success $.ajax({ type: POST, url: submit1.php, data: $(#regist).serialize(), dataType: json, success: function(){ $(#loading).append(h2you are here/h2); }, error: function(x,y,z) { // x.responseText -- will have the server side error message if PHP outputs what is wrong } }); On Dec 28, 8:20 am, idcoder idrishlaxmid...@gmail.com wrote: Hi, Can anyone explain me what does success function arguments contain..for ajax jquery.. I read the following in the documentation success - Function A function to be called if the request succeeds. The function gets passed two arguments: The data returned from the server, formatted according to the 'dataType' parameter, and a string describing the status. This is an Ajax Event. function (data, textStatus) { // data could be xmlDoc, jsonObj, html, text, etc... this; // the options for this ajax request } i want to know what is the data and textStatus I have this code here : $(document).ready(function(){ $(form#regist).submit(function() { var str = $(#regist).serialize(); $.ajax({ type: POST, url: submit1.php, data: $(#regist).serialize(), dataType: json, success: function(){ $(#loading).append(h2you are here/h2); } }); return false; }); }); the success part does not work.. i can enter the data into the DB if all fields entered are correct..However if something is wrong then nothing happens. Can anyone guide me where i am going wrong..Thanks a lot..
[jQuery] Re: wild card selectors question
If it was me, I'm not sure i would hide the row from the user, because as an example, what happens if I accidentally select the 9 choice? by hiding the row from the user's view, you do not give them the ability to fix that mistake... none the less, you can do what you seek without worrying about breaking up and parsing out the id's of the controls/rows, jQuery's parent() selector makes this easy: case in point: http://jsbin.com/uberi/edit also note the usage of event delegation, which allows one single DOM object, the table, to have the event latched onto it, which may be a big resource saver if you've got a ton of these rows/radio-buttons
[jQuery] Re: Can't get the $.POST working
but the FLASH chart is not reloading Maybe i am missing something, but where in your shown code above are you attempting to reload anything? your $.post command only has target URL and params specified, not any actions tied to success On Dec 26, 11:00 pm, Tristan tristan.bessou...@gmail.com wrote: ok, i turned on my brain and i found the error : $(nomGSP).click(function () { incorrect $(#nomGSP).click(function () { correct but it would not be fun if it works ! i've got the correct data produced by the changing (i can see it in the ajax request), but the FLASH chart is not reloading so all i can see is the original flash chart (not updated) any ideas ? the flash chart is contained into an div and the options are provided by this : swfobject.embedSWF( ../open-flash-chart.swf, graphique3, 900, 800, 9.0.0, /expressInstall.swf, {data-file:../graphiques/notes.php, loading:loooading...} ); Thanks
[jQuery] Re: open drodown
If there was an API for it, it would be on the docs page (http:// docs.jquery.com), but in thinking what a select looks like when it's open, it's easy to use some simple code to change the select's size property (http://www.w3schools.com/TAGS/att_select_size.asp) from 1 to # of children and back again: (working) case in point: http://jsbin.com/iloqa/edit On Dec 26, 1:45 pm, fachhoch fachh...@gmail.com wrote: My select drop down is inside a div , I am wondering if jquery has any api to open the dropdwon ,when user clicks on the div ? div class=wrapper select name=infGrantProgram id=program wicket:id=infGrantProgram option value= selected=selectedChoose One/option option value=114AD - DEVELOPMENTAL DISABLITIES - 94006/option option value=372AC - Developmental Disabilities Councils - 93630/option option value=771ADPTASST - Adoption Assistance - 93659/option option value=978AE1 - Community Based Abstinence Education - 93010/option option value=935AEGP - Abstinence Education Grant Program - 93235/option option value=815ZV - ASSISTANCE FOR VICTIMS OF TRAFFICKING - 93598/option /select /div -- View this message in context:http://old.nabble.com/open-drodown-tp26929027s27240p26929027.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.