[jQuery] selector :contains different behaviour in firefox and msie 7
hi, i have a strange behaviour when parsing the xml below: $.get('/test/Internetschuhe.XML', function(data) { $(data).find('item').each(function() { var $entry = $(this); var $sizenotnull = $entry.find(stock:contains('0')); alert($sizenotnull.length); in firefox it works... the alert is 1 and thats right... i have one size with the stock 0 in msie7 the alert is 0... why... is it a bug? best regards m cologne ?xml version=1.0 encoding=iso-8859-1 standalone=no? itemdata item number131001051/number numberformated131 001 051/numberformated producer id7558/id nameECCOLET SKO GMBH/name iln579260676/iln vatidDE118625892/vatid /producer produceritem80184-01001/produceritem articlesystem id131/id textStrassenhalbschuhe modisch/text systemSONST/system systemhierarchy1234/systemhierarchy structures structure id1/id textHerrenschuhe/text /structure structure id13/id textSchnürhalbschuhe/text /structure structure id131/id textStrassenhalbschuhe modisch/text /structure structure id131/id textStrassenhalbschuhe modisch/text /structure /structures /articlesystem maingroup idSH/id textSCHUHE/text /maingroup colorschwarz/color attributes attribute idFarbe/id valueschwarz/value /attribute attribute idMaterial/id valueGlattleder/value /attribute /attributes variants variant idSOPO/id textSonderposten/text /variant /variants vat idnormal/id value19,00/value /vat sizetable idN02/id textGERMANY/text /sizetable standardN/standard itemgroups itemgroup idINTERNET/id /itemgroup /itemgroups pictureT:\Internet Bilder schuhe\131001051.jpg/picture sizes size sizeid23/sizeid sizebarcode400/sizebarcode sizeshort 40/sizeshort sizelong 40/sizelong gpp 21,40/gpp gppcurrencyEUR/gppcurrency npp 21,15/npp nppcurrencyEUR/nppcurrency sp 59,95/sp spcurrencyEUR/spcurrency stock0/stock /size size sizeid24/sizeid sizebarcode410/sizebarcode sizeshort 41/sizeshort sizelong 41/sizelong gpp 21,40/gpp gppcurrencyEUR/gppcurrency npp 21,15/npp nppcurrencyEUR/nppcurrency sp 59,95/sp spcurrencyEUR/spcurrency stock1/stock /size size sizeid25/sizeid sizebarcode420/sizebarcode sizeshort 42/sizeshort sizelong 42/sizelong gpp 21,40/gpp gppcurrencyEUR/gppcurrency
[jQuery] Re: how Jquery to get this json data ?
http://ekrantz.com/index.php/2007/06/06/json-and-associative-arrays.html 2009/3/7 YuanYuan yuan2y...@gmail.com I want get a json data, but alaways err. anyone know, how to get softwareList.for001.idhttp://softwarelist.for001.id/? or get softwareList for001~for002 text ? r({ softwareList: [ {'for001': {id:'for001', sType:'s', name:'test', fsize:'5MB', link:'a.b.c', revisionLog:['test'], programName:'a.exe'} }, {'for002': {id:'for002', sType:'s', name:'test', fsize:'5MB', link:'a.b.c', revisionLog:['test'], programName:'b.exe'} } ] }) thanks.
[jQuery] Jquery UI Dialog - default button (focus on the default button)
Hello I am using Jquery plugin Dialog and i can not figure out how to make the Ok button the first one from the left and selected. By default the selected button is one on the left, but I want Ok to be on the left. Anybody knows? Thanks
[jQuery] Re: Jquery UI Dialog - default button (focus on the default button)
there is an own group for ui: http://groups.google.com/group/jquery-en you can change the focus by adding: open: function() { $(this).parents('.ui-dialog-buttonpane button:eq(0)').focus(); }, On 8 Mrz., 13:23, Alexey alexey.polio...@gmail.com wrote: Hello I am using Jquery plugin Dialog and i can not figure out how to make the Ok button the first one from the left and selected. By default the selected button is one on the left, but I want Ok to be on the left. Anybody knows? Thanks
[jQuery] Re: Jquery UI Dialog - default button (focus on the default button)
http://groups.google.com/group/jquery-ui On 8 Mrz., 14:20, mcologne blueameri...@web.de wrote: there is an own group for ui:http://groups.google.com/group/jquery-en you can change the focus by adding: open: function() { $(this).parents('.ui-dialog-buttonpane button:eq(0)').focus(); }, On 8 Mrz., 13:23, Alexey alexey.polio...@gmail.com wrote: Hello I am using Jquery plugin Dialog and i can not figure out how to make the Ok button the first one from the left and selected. By default the selected button is one on the left, but I want Ok to be on the left. Anybody knows? Thanks
[jQuery] Re: Cycle Plugin Adds Inline Styling to Slides / How To Center Slides in Container
After at least 4 hours in Firebug and CSS code, I switched something that started working. I'm amazed at how difficult it was to do, when it should have been so simple, but all's well that ends well. Thanks again. Glad to hear it's working for you now, but it sounds like you got lucky without really knowing why. I'll try to explain how the horz centering works. If you have a slideshow that simply consists of images within a container you will not be able to reliably achieve horizontal centering because the Cycle plugin needs to position slides absolutely at 0,0 (left,top). So the key is to put those images inside wrapper divs and let the wrapper divs function as the slides. Give the wrapper divs the exact same size as the container and then give the images within a display:block and margin:auto style. For example: div id=slideshow div class=slide img src=image1.jpg width=300 height=200 / /div div class=slide img src=image2.jpg width=200 height=300 / /div /div #slideshow, .slide { width: 400px; height: 300px } .slide img { display: block; margin: auto }
[jQuery] jMap trouble
At this page you can see my map: http://www.nothingisclear.net/ndovado/_gmap.php In the page's source code, you can see how I set up the map. Please do not care about the input box at the bottom of the div. The map must provide a way to select location on itself. For reach this, I need to customize its behaviour by managing its event. As you can see, at the lines 61 and 64 I add a listener two listener at the map. But they doesn't work. for example, when i click on the map the event click doesn't fire. Can you help me? (IE7 FF3) + Goole AJAX Api 2.x + jQuery + jMap hi there
[jQuery] Show/hide multiple TDs with one function?
Hi. I have a table with multiple TDs (with different classes) that I want to toggle (show/hide) with one function, from checking different checkboxes that relate to the different TDs. I'm thinking I should pass a variable to the function (from each checkbox) which then show/hides the different TDs using their class names, based on the variable passed. But I'm new to jQuery, so does anyone have a tip for how this could be done?
[jQuery] Re-distribute jQuery
Hello, I want to include jQuery as part of my jQuery plugin so user can include only one file and can use immediately. I want to release under MIT liecnese, so is it just include the original liecnse senstence is okay? Thanks.
[jQuery] Re: Show/hide multiple TDs with one function?
I have a table with multiple TDs (with different classes) that I want to toggle (show/hide) with one function, from checking different checkboxes that relate to the different TDs. I'm thinking I should pass a variable to the function (from each checkbox) which then show/hides the different TDs using their class names, based on the variable passed. But I'm new to jQuery, so does anyone have a tip for how this could be done? I've found that the best way to hide/show table columns is to simply set/remove a class on the table element and then to define CSS rules based on the class name. For example, given this markup: input id=blah type=checkbox / table id=myTable trtd class=onetd class=two/tr /table You define a CSS rule like this: table.blah td.one { display: none } Then you add a handler for the checkbox: $('#blah').change(function() { if (this.checked) $('#myTable').addClass('blah'); else $('#myTable').removeClass('blah'); });
[jQuery] Re: Need Help with changing css on an object
Hi Chris My suggestion to your problem will involve a few changes to your structure, but I don't think they should be too bad for you to pull off. Since the texts in your nav don't change on rollover, I would make them a separate image all together. Then you could make just 2 different background images of the light bulb. One for the on state and one for the off state. This way you can set up 2 classes in your css, something like: .navBulb{background-image: url(/images/bulb_off.gif);} .navBulbOn{background-image: url(/images/bulb_on.gif);} That way you can assign the .navBulb class to all 4 of them to start with, and then just addClass('navBulbOn') and removeClass('navBulb') as needed on hover and click events. The other thing I've done that might work even easier for you would be oonce again to separate out the text into a different image, and then make one background image that includes both states (bulb on and bulb off) and then on hover or click events you would just need to change the position of the background to show/hide the right portion of the background image. I hope this helps. Marty On Mar 7, 11:27 pm, zeckdude zeckd...@gmail.com wrote: Hi, I am having some issues with my site. I have a main Nav with four links that load in 4 different sections. You can see the page I am working on here:http://idea-palette.com/official/newofficialsite4.htmlhttp://idea-palette.com/official/newofficialsite4.html What I am trying to do is, when a user clicks on another Main Nav button, such as 'Web Projects', the background-image changes to another image that shows the lightbulb being on. I also want it to change back the background-image for any link that currently has the light on, so that it seems the light is on for whatever page the user visits. Here is my basic html layout that pertains: body div id=container div id=header div id=nav li anchor tag span tag Each of the links are called 'printsectbtn', 'websectbtn', and so on. Each of the default background-images is called 'print_off.png', 'web_off.png', and so on. Each of the background images that show up when a user clicks that link are called 'print_on.png', 'web_on.png', and so on. I have started all their names with either 'print', 'web', 'mot', or 'int' so that I could make it dynamic and simply erase some letters from the clicked div's name and then add some others at the end. Here is my jquery that pertains to this issue: $(function(){ $('#nav li a').click(function(){ var clickedLinkId = $(this).attr('id'); //This is the ID of the Main Nav Link that was clicked var picOnLocation = 'images/' + clickedLinkId - 'sectbtn' + '_on' + '.png'; //This is the location of the new background image once the user clicks a button var picOnUrl = 'url(' + picOnLocation + ')'; //This combines the background image location and URL Line $('#' + clickedLinkId + ' span').css({background-image:picOnUrl}); //This changes the background image of the span of the currently clicked link. return false; }); }); Basically, what I am trying to do above is to: 1) Get the ID of the clicked link. I called this var ClickedLinkId. 2) Erase the word 'sectbtn' from the end of the ID, so that it just reads as 'print' or 'web' for example 3) Add 'images/' before the word and '_on.png' after the word, so that it is the location of the new background Image that shows up after the user clicks on a link. I called this var picOnLocation. 4) Combine the new background Image location(picOnLocation) and URL line. I called this var picOnUrl. 5) Change the css of the clicked Link's span to show up as the new background image as specified by picOnUrl. What I am using does work as I can see the current background disappear, but no new background loads in. Also, when I try this: var picOnUrl = url('images/web_on.png'); ,it works fine, so I think I may have an issue with it not being able to find the background image file or perhaps my concatenation is incorrect. Here's my folder structure if it helps: newofficialdesign4.html IMAGES - print_on.png - web_on.png - mot_on.png - int_on.png I know this is a really long post, but I am really hoping someone can help me, so I included all the specifics. Please let me know if there are any other questions that I can answer to help you help me. Thanks in advance! -Chris -- View this message in context:http://www.nabble.com/Need-Help-with-changing-css-on-an-object-tp2239... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] help with type rendering via FaceLift (FLIR)?
hello, I have a question about using jquery with facelift. I am pulling text from an input box in a form to be rendered by facelift. the code is this: -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titleChristoph Dunst/title meta http-equiv=Content-Type content=text/html;charset=utf-8 / meta http-equiv=Content-Style-Type content=text/css / meta name=author content=christoph dunst / meta name=copyright content=c. dunst / meta http-equiv=imagetoolbar content=no / script src=js/jquery-1.3.2.min.js type=text/javascript charset=utf-8/script script language=javascript src=facelift/flir.js/script script type=text/javascript charset=utf-8 $(document).ready(function() { // initialize FLIR FLIR.init({ path: 'facelift/' }); // get the content of text and put it in the div $('#submit').submit(function(){ $('#rendered').html($(#text).val()); $(#rendered).each( function() { FLIR.replace(this); } ); return false; }); }); /script /head body form id=submit method= accept-charset=utf-8 input type=text name=text value= id=text select name=size option8/option option10/option option12/option option14/option option18/option /select pbutton id=render text/button/p /form div id=rendered/div /body -- for some reason, though, the script runs only the first time. when trying to type a new text in the input, the button would just not submit the form. has anybody an idea of what could the problem be? thank you.
[jQuery] clone of an element to be dropped draggable
hi i want to a clone of an element to be dropped and dragged. i am using the standard jquery 1.3 and jquery ui 1.7. i tried the helper clone option. it creates a clone when dragged, but when it is dropped it just reverts back to the original position. but i want a clone also to be dropped. for example: http://jqueryui.com/demos/draggable/revert.html i tried this demo with revert set to false. but still a clone is not dropped. thanks a lot!
[jQuery] Re: Need Help with changing css on an object
good case of trying to add a bunch of script when simple css works. Spriting the menu images into one (with or without the text included on each part of image), adding a :hover in css avoids an unnecessary server request for another image and works if scripting disabled junk.mail...@gmail.com wrote: Hi Chris My suggestion to your problem will involve a few changes to your structure, but I don't think they should be too bad for you to pull off. Since the texts in your nav don't change on rollover, I would make them a separate image all together. Then you could make just 2 different background images of the light bulb. One for the on state and one for the off state. This way you can set up 2 classes in your css, something like: .navBulb{background-image: url(/images/bulb_off.gif);} .navBulbOn{background-image: url(/images/bulb_on.gif);} That way you can assign the .navBulb class to all 4 of them to start with, and then just addClass('navBulbOn') and removeClass('navBulb') as needed on hover and click events. The other thing I've done that might work even easier for you would be oonce again to separate out the text into a different image, and then make one background image that includes both states (bulb on and bulb off) and then on hover or click events you would just need to change the position of the background to show/hide the right portion of the background image. I hope this helps. Marty On Mar 7, 11:27pm, zeckdude zeckd...@gmail.com wrote: Hi, I am having some issues with my site. I have a main Nav with four links that load in 4 different sections. You can see the page I am working on here:http://idea-palette.com/official/newofficialsite4.htmlhttp://idea-palette.com/official/newofficialsite4.html What I am trying to do is, when a user clicks on another Main Nav button, such as 'Web Projects', the background-image changes to another image that shows the lightbulb being on. I also want it to change back the background-image for any link that currently has the light on, so that it seems the light is on for whatever page the user visits. Here is my basic html layout that pertains: body div id="container" div id="header" div id="nav" li anchor tag span tag Each of the links are called 'printsectbtn', 'websectbtn', and so on. Each of the default background-images is called 'print_off.png', 'web_off.png', and so on. Each of the background images that show up when a user clicks that link are called 'print_on.png', 'web_on.png', and so on. I have started all their names with either 'print', 'web', 'mot', or 'int' so that I could make it dynamic and simply erase some letters from the clicked div's name and then add some others at the end. Here is my jquery that pertains to this issue: $(function(){ $('#nav li a').click(function(){ var clickedLinkId = $(this).attr('id'); //This is the ID of the Main Nav Link that was clicked var picOnLocation = 'images/' + clickedLinkId - 'sectbtn' + '_on' + '.png'; //This is the location of the new background image once the user clicks a button var picOnUrl = 'url(' + picOnLocation + ')'; //This combines the background image location and URL Line $('#' + clickedLinkId + ' span').css({"background-image":picOnUrl}); //This changes the background image of the span of the currently clicked link. return false; }); }); Basically, what I am trying to do above is to: 1) Get the ID of the clicked link. I called this var ClickedLinkId. 2) Erase the word 'sectbtn' from the end of the ID, so that it just reads as 'print' or 'web' for example 3) Add 'images/' before the word and '_on.png' after the word, so that it is the location of the new background Image that shows up after the user clicks on a link. I called this var picOnLocation. 4) Combine the new background Image location(picOnLocation) and URL line. I called this var picOnUrl. 5) Change the css of the clicked Link's span to show up as the new background image as specified by picOnUrl. What I am using does work as I can see the current background disappear, but no new background loads in. Also, when I try this: var picOnUrl = "url('images/web_on.png')"; ,it works fine, so I think I may have an issue with it not being able to find the background image file or perhaps my concatenation is incorrect. Here's my folder structure if it helps: newofficialdesign4.html IMAGES - print_on.png - web_on.png - mot_on.png - int_on.png I know this is a really long post, but I am really hoping someone can help me, so I included all the specifics. Please let me know if there are any other questions that I can answer to help you help me. Thanks in advance! -Chris -- View this message in context:http://www.nabble.com/Need-Help-with-changing-css-on-an-object-tp2239... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Malsup's Cycle plugin exhibiting strange behavior
I've got an instance of Mike Alsup's Cycle slideshow working on the homepage of a project I'm finishing up, and I'm having different issues with it depending on the browser being used. All of the issues seem to be happening in Mac only browsers. Here's the site I'm having trouble with: http://elixir.biz/coders/marlins/incoming/ The first issue is in FF 3.0.7 on Mac. Occasionally, the first image appears no problem, however the remaining images show up extremely small. I tried setting a fixed width and height to the images, but that didn't have an effect on it. The other issue is in Safari 3 on Mac. The first image appears, but after it fades out no other images fade in. After a set amount of time, the first image shows up again, then it repeats the process. This happens every time. Is this an issue with the JQuery?
[jQuery] Re: Need Help with changing css on an object
Chris Charlie is absolutely right. You can simplify it by using the css :hover to do your rollover states. You still however need to do something on top of that to handle the current problem you're having with it keeping the state change when a user clicks on one of the nav elements. That's really where my thought process was in my post. Sorry that I missed the obvious with the css :hover state and thanks to Charlie for catching it. Marty On Mar 8, 11:42 am, Charlie Tomlinson charlie...@gmail.com wrote: good case of trying to add a bunch of script when simple css works. Spriting the menu images into one (with or without the text included on each part of image), adding a :hover in css avoids an unnecessary server request for another image and works if scripting disabledjunk.mail...@gmail.comwrote:Hi Chris My suggestion to your problem will involve a few changes to your structure, but I don't think they should be too bad for you to pull off. Since the texts in your nav don't change on rollover, I would make them a separate image all together. Then you could make just 2 different background images of the light bulb. One for the on state and one for the off state. This way you can set up 2 classes in your css, something like: .navBulb{background-image: url(/images/bulb_off.gif);} .navBulbOn{background-image: url(/images/bulb_on.gif);} That way you can assign the .navBulb class to all 4 of them to start with, and then just addClass('navBulbOn') and removeClass('navBulb') as needed on hover and click events. The other thing I've done that might work even easier for you would be oonce again to separate out the text into a different image, and then make one background image that includes both states (bulb on and bulb off) and then on hover or click events you would just need to change the position of the background to show/hide the right portion of the background image. I hope this helps. Marty On Mar 7, 11:27 pm, zeckdudezeckd...@gmail.comwrote:Hi, I am having some issues with my site. I have a main Nav with four links that load in 4 different sections. You can see the page I am working on here:http://idea-palette.com/official/newofficialsite4.htmlhttp://idea-palette.com/official/newofficialsite4.htmlWhat I am trying to do is, when a user clicks on another Main Nav button, such as 'Web Projects', the background-image changes to another image that shows the lightbulb being on. I also want it to change back the background-image for any link that currently has the light on, so that it seems the light is on for whatever page the user visits. Here is my basic html layout that pertains: body div id=container div id=header div id=nav li anchor tag span tag Each of the links are called 'printsectbtn', 'websectbtn', and so on. Each of the default background-images is called 'print_off.png', 'web_off.png', and so on. Each of the background images that show up when a user clicks that link are called 'print_on.png', 'web_on.png', and so on. I have started all their names with either 'print', 'web', 'mot', or 'int' so that I could make it dynamic and simply erase some letters from the clicked div's name and then add some others at the end. Here is my jquery that pertains to this issue: $(function(){ $('#nav li a').click(function(){ var clickedLinkId = $(this).attr('id'); //This is the ID of the Main Nav Link that was clicked var picOnLocation = 'images/' + clickedLinkId - 'sectbtn' + '_on' + '.png'; //This is the location of the new background image once the user clicks a button var picOnUrl = 'url(' + picOnLocation + ')'; //This combines the background image location and URL Line $('#' + clickedLinkId + ' span').css({background-image:picOnUrl}); //This changes the background image of the span of the currently clicked link. return false; }); }); Basically, what I am trying to do above is to: 1) Get the ID of the clicked link. I called this var ClickedLinkId. 2) Erase the word 'sectbtn' from the end of the ID, so that it just reads as 'print' or 'web' for example 3) Add 'images/' before the word and '_on.png' after the word, so that it is the location of the new background Image that shows up after the user clicks on a link. I called this var picOnLocation. 4) Combine the new background Image location(picOnLocation) and URL line. I called this var picOnUrl. 5) Change the css of the clicked Link's span to show up as the new background image as specified by picOnUrl. What I am using does work as I can see the current background disappear, but no new background loads in. Also, when I try this: var picOnUrl = url('images/web_on.png'); ,it works fine, so I think I may have an issue with it not being able to find the background image file or perhaps my concatenation is incorrect. Here's my folder
[jQuery] IE image load fix
http://blog.blazed-designs.com/2009/03/01/jcarousel-loading-fix-for-ie/ That link tells you all you need to know about what i did to fix and could be done to fix the issue. Thanks
[jQuery] Posting XML to an asp.net page (MVC) with jquery?
Hey folks, I have code such as: $.post('/Controller/Process', { messageXml: escape(xml) }, function(txt) { //debugger; ...dosomething }); The xml gets sent, but its encoded. Anyone know how to unencode this? Or is there a better way to submit xml to a page?
[jQuery] mousedown event doesn't happen until mouseup on iPhone
Is anyone else trying to use jQuery on the iPhone? I'm doing a game using PhoneGap for iPhone and iPod Touch (with the hope of moving on to other phones). Everything was going swimmingly until I tried a mousedown event. Works correctly in PC and Mac versions of Safari, but no event occurs until the user pulls a finger up when using the iPhone's Safari. Current solution is to move from jQuery's mousedown to XUI library's touchstart event. Another concern with jQuery is that it's large compared to XUI. Much of that is due to jQuery's smoothing out of IE's quirks. Any thoughts of a tuned version of jQuery for mobile, or specifically for iPhone?
[jQuery] Re: Malsup's Cycle plugin exhibiting strange behavior
The first issue is in FF 3.0.7 on Mac. Occasionally, the first image appears no problem, however the remaining images show up extremely small. I tried setting a fixed width and height to the images, but that didn't have an effect on it. The other issue is in Safari 3 on Mac. The first image appears, but after it fades out no other images fade in. After a set amount of time, the first image shows up again, then it repeats the process. This happens every time. Is this an issue with the JQuery? Can you please try the latest version of the Cycle plugin? Some sizing bugs were fixed in late February. http://www.malsup.com/jquery/cycle/download.html Mike
[jQuery] Re: Malsup's Cycle plugin exhibiting strange behavior
That looks to have done it. Thanks! On Mar 8, 1:12 pm, Mike Alsup mal...@gmail.com wrote: The first issue is in FF 3.0.7 on Mac. Occasionally, the first image appears no problem, however the remaining images show up extremely small. I tried setting a fixed width and height to the images, but that didn't have an effect on it. The other issue is in Safari 3 on Mac. The first image appears, but after it fades out no other images fade in. After a set amount of time, the first image shows up again, then it repeats the process. This happens every time. Is this an issue with the JQuery? Can you please try the latest version of the Cycle plugin? Some sizing bugs were fixed in late February. http://www.malsup.com/jquery/cycle/download.html Mike
[jQuery] Re: Drop down menu disappears when you hover over Cycle slideshow area
Nevermind, I've changed it to toggle onclick instead. On Mar 7, 9:12 am, Shane Riley shanerileydoti...@gmail.com wrote: I've tried getting this to work properly in IE with a variety of different methods, and none are working. The page in question is here:http://elixir.biz/coders/marlins/incoming/photos.php If you hover over the blue team text it will display a drop-down menu. However, in IE6 and IE7 once you've moused over the area where the drop down menu overlaps the thumbnails, it disappears. Initially I thought it may be a z-index issue between it and the Cycle slideshow in the thumbnails area, but no combination of absolute, relative, and z-index on the elements has any effect. My next course of action was to comment out the thumbnails and the main image to see if it worked, and it did. However, when commenting out only one of these two areas, it no longer works, and it doesn't matter which is commented out. I've also tried moving the category drop-down after the rest of the markup, tried adding a clearing div between the category area and the thumbnails, tried adding/removing all sorts of CSS properties to the category list, and none seem to get it working in IE. I'm left wondering if this is an issue with my JQuery instead. I tried substituting my hover() with mouseover and mouseout, but it behaved the same.
[jQuery] Re: How does Facebook do to edit profile picture thumbnails?
i don't want the thumbnail to be saved, i was just wondering where i could get the javascript to just be able to move the image inside the div... thx anyways:) On Mar 7, 3:44 pm, Brian notta...@gmail.com wrote: Is there a specific part that's inconceivable? I can imagine one way to do it--probably very similarly to how Facebook does it--which follows. Markup-wise, the containing div + image must look roughly like div id=thumb-container style=width: 50px; height: 50px; overflow: hidden; position: relative; img id=small-profile-img style=position: absolute; src=small- profile.jpg alt=small profile picture / /div The JavaScript watches for click-dragging on #small-profile-img, and sets #small-profile-img's 'top' and 'left' style attributes as needed, so long as height height+top 50 and width width+left 50 (since some part of the image must cover the 50x50 viewport). Since the image is inside a div with hidden overflow, it can only be seen in the 50x50 viewport of the parent. Once you click submit, the top and left positions are sent to a serverside page that handles the actual thumbnail-making. ImageMagick would work. I hope this overview helps some missing concept click. On Mar 6, 8:03 pm, juan-i holamellamoju...@gmail.com wrote: I just can't figure that out! On FB, you get to change the thumnail for your profile picture. You have a containing div with dimensions of about 50x50 and you can move the image (which is actually bigger) inside that containing div until it displays what you want. Ideas?
[jQuery] Re: How does Facebook do to edit profile picture thumbnails?
check out jCrop http://deepliquid.com/content/Jcrop.html On Mar 8, 1:57 pm, juan-i holamellamoju...@gmail.com wrote: i don't want the thumbnail to be saved, i was just wondering where i could get the javascript to just be able to move the image inside the div... thx anyways:) On Mar 7, 3:44 pm, Brian notta...@gmail.com wrote: Is there a specific part that's inconceivable? I can imagine one way to do it--probably very similarly to how Facebook does it--which follows. Markup-wise, the containing div + image must look roughly like div id=thumb-container style=width: 50px; height: 50px; overflow: hidden; position: relative; img id=small-profile-img style=position: absolute; src=small- profile.jpg alt=small profile picture / /div The JavaScript watches for click-dragging on #small-profile-img, and sets #small-profile-img's 'top' and 'left' style attributes as needed, so long as height height+top 50 and width width+left 50 (since some part of the image must cover the 50x50 viewport). Since the image is inside a div with hidden overflow, it can only be seen in the 50x50 viewport of the parent. Once you click submit, the top and left positions are sent to a serverside page that handles the actual thumbnail-making. ImageMagick would work. I hope this overview helps some missing concept click. On Mar 6, 8:03 pm, juan-i holamellamoju...@gmail.com wrote: I just can't figure that out! On FB, you get to change the thumnail for your profile picture. You have a containing div with dimensions of about 50x50 and you can move the image (which is actually bigger) inside that containing div until it displays what you want. Ideas?
[jQuery] Re: How does Facebook do to edit profile picture thumbnails?
Look at the jCrop plugin. It does all that. On Mar 6, 11:03 pm, juan-i holamellamoju...@gmail.com wrote: I just can't figure that out! On FB, you get to change the thumnail for your profile picture. You have a containing div with dimensions of about 50x50 and you can move the image (which is actually bigger) inside that containing div until it displays what you want. Ideas?
[jQuery] Re: Show/hide multiple TDs with one function?
Hi Mike, and thanks for the answer. The thing is that I want to show/hide the TDs and not the entire table itself. I have multiple rows, and want to toggle one TD for each row - not all the TDs in each row. On 8 Mar, 14:54, Mike Alsup mal...@gmail.com wrote: I have a table with multiple TDs (with different classes) that I want to toggle (show/hide) with one function, from checking different checkboxes that relate to the different TDs. I'm thinking I should pass a variable to the function (from each checkbox) which then show/hides the different TDs using their class names, based on the variable passed. But I'm new to jQuery, so does anyone have a tip for how this could be done? I've found that the best way to hide/show table columns is to simply set/remove a class on the table element and then to define CSS rules based on the class name. For example, given this markup: input id=blah type=checkbox / table id=myTable trtd class=onetd class=two/tr /table You define a CSS rule like this: table.blah td.one { display: none } Then you add a handler for the checkbox: $('#blah').change(function() { if (this.checked) $('#myTable').addClass('blah'); else $('#myTable').removeClass('blah'); });
[jQuery] Re: thickbox 3.1 and new jquery 1.3.1 - please help
jQuery Lover, Thank you so much. It worked fine now. You can see it here http://www.laseralliance.com On Feb 7, 2:24 am, jQuery Lover ilovejqu...@gmail.com wrote: Try to delete @ on line 79. 79: TB_TempArray = $(a...@rel=+imageGroup+]).get(); 79: TB_TempArray = $(a[rel=+imageGroup+]).get(); Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sat, Feb 7, 2009 at 3:43 AM, newbie alanv...@gmail.com wrote: I upgraded from jquery 1.2.2 to 1.31 but thickbox 3.1 does not work. Any help is appreciated
[jQuery] Re: Show/hide multiple TDs with one function?
The thing is that I want to show/hide the TDs and not the entire table itself. I have multiple rows, and want to toggle one TD for each row - not all the TDs in each row. I know. That's exactly what I was showing how to do. You add/remove a class on the table but put a style rule on the td.
[jQuery] Re: Combining results of two getJSON calls
Thank you, Michael. Of course, the display loop has to be nested inside the inner getJSON. $.getJSON(friendsURL, function(friends){ $.getJSON(repliesURL, function(replies){ friends = $.merge(friends, replies); $.each(friends, function(item){ // Display the item. }); // each }); // getJSON replies }); // getJSON friends Once I got that straightened out, I realized I have to use $.merge instead of $.extend because the Twitter object is an array, and $.extend just replaces the items with the same index. Now it's on to sorting. -- Dr. Drang
[jQuery] A part of .ajax I don't understand
Hi out there. I'm having a little trouble with my .ajax. Here's the function: var name = $('#username').val(); var pass = $('#pass').val(); $.ajax({ url: 'signin.php', type: 'GET', data: 'username=' + name + 'pass=' + pass, success: function(submitreturn){ alert(submitreturn); } }); Here's signin.php: ?php require_once(classes/Login.php); $user = $_GET['username']; $pass = $_GET['pass']; $login = new Login(); if($login-login_user($user, md5(md5($pass) . POSTPASSKEY))) { return I DID IT; } else { return I DIDNT DO IT; } ? Okay, so here's my question. When the .ajax runs, the alert window contains the string that was in the username input, and br /. Why is this? Why isn't submitreturn the value that was returned by signin.php? How can I get the value returned by signin.php? Thanks for your help! -Ethan
[jQuery] Re: A part of .ajax I don't understand
In your PHP script, you're suppose to print (echo) your response. Make sure to put an 'exit' afterwards so you don't continue processing the rest of your script and return (print) unexpected content. On Mar 8, 11:17 am, Ethan edgewood7...@gmail.com wrote: Hi out there. I'm having a little trouble with my .ajax. Here's the function: var name = $('#username').val(); var pass = $('#pass').val(); $.ajax({ url: 'signin.php', type: 'GET', data: 'username=' + name + 'pass=' + pass, success: function(submitreturn){ alert(submitreturn); } }); Here's signin.php: ?php require_once(classes/Login.php); $user = $_GET['username']; $pass = $_GET['pass']; $login = new Login(); if($login-login_user($user, md5(md5($pass) . POSTPASSKEY))) { return I DID IT;} else { return I DIDNT DO IT; } ? Okay, so here's my question. When the .ajax runs, the alert window contains the string that was in the username input, and br /. Why is this? Why isn't submitreturn the value that was returned by signin.php? How can I get the value returned by signin.php? Thanks for your help! -Ethan
[jQuery] Superfish menu, IE7 bug - menu expands in a flash when changing page
Hey all ! I have created a superfish menu for my modx website, based on the exsisting menu: wayfinder.jmultilevel. Note: the problem i'm having is related to internet explorer 7, the menu works flawless in firefox. When you click on an menu item and get directed to the new page, the menu suddenly appears fully expanded for a split second, and then returns to normal. I'am not sure if the problem appears the first time you click a link, you might have to try again before the bug springs. Also, you need to click on an menu item, the problem dosent come if you just press F5 for update. My website: http://www.norlins.dk/uchihaproject/ Files im using in my menu: JQUERY.JS: http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/jquery.js HOVERINTET.JS http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/hoverintent.js STYLE.CSS http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/style.css SUPERFISH.JS http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/style.css Thanks!! =)
[jQuery] jQuery breaks LastPass extension
I'm currently developing a firefox extension, and I use jQuery. I've noticed that LastPass, anohter extension, doesnt seem to work properly if I include jQuery in my XUL file. I've tried using jQuery instead of $ and calling noConflict without any change. Any ideas?
[jQuery] Re: Malsup's Cycle plugin exhibiting strange behavior
Actually, now the client has said that the issue still appears in FF 3 on Windows. I'm installing a new copy on a virtual machine to test it now, but is it possible there's still unresolved issues with the sizing?
[jQuery] Re: Superfish menu, IE7 bug - menu expands in a flash when changing page
multilevel.css has an unclosed comment mark might be causing a problem /*.nav li:hover ul,ul.nav li.sfHover ul {left:0px;top:2em;} jonasnorlin wrote: Hey all ! I have created a superfish menu for my modx website, based on the exsisting menu: wayfinder.jmultilevel. Note: the problem i'm having is related to internet explorer 7, the menu works flawless in firefox. When you click on an menu item and get directed to the new page, the menu suddenly appears fully expanded for a split second, and then returns to normal. I'am not sure if the problem appears the first time you click a link, you might have to try again before the bug springs. Also, you need to click on an menu item, the problem dosent come if you just press F5 for update. My website: http://www.norlins.dk/uchihaproject/ Files im using in my menu: JQUERY.JS: http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/jquery.js HOVERINTET.JS http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/hoverintent.js STYLE.CSS http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/style.css SUPERFISH.JS http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/style.css Thanks!! =)
[jQuery] Re: Superfish menu, IE7 bug - menu expands in a flash when changing page
That is wierd. When i delete the comment mark the problem remains, but this time when i press F5 and update a page the problem now suddenly appears too! When i delete the entire line same result as mentioned, but when i add the start comment mark the bug only appears when shifting pages!! So wierd!. On Mar 8, 11:35 pm, Charlie Tomlinson charlie...@gmail.com wrote: multilevel.css has an unclosed comment mark might be causing a problem/*.nav li:hover ul,ul.nav li.sfHover ul {left:0px;top:2em;} jonasnorlin wrote:Hey all ! I have created asuperfishmenu for my modx website, based on the exsisting menu: wayfinder.jmultilevel. Note: the problem i'm having is related to internet explorer 7, the menu works flawless in firefox. When you click on an menu item and get directed to the new page, the menu suddenly appears fully expanded for a split second, and then returns to normal. I'am not sure if the problem appears the first time you click a link, you might have to try again before the bug springs. Also, you need to click on an menu item, the problem dosent come if you just press F5 for update. My website:http://www.norlins.dk/uchihaproject/Files im using in my menu: JQUERY.JS:http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/jquery.jsHOVERINTET.JShttp://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/hoverintent.jsSTYLE.CSShttp://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/style.cssSUPERFISH.JShttp://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/style.cssThanks!! =)
[jQuery] [autocomplete] function instead of list
Hi folks, Is there a way to call function instead of taking data from the list when doing local field completion ? In the example I am trying to form a list of artists locally in JS function : // make artist input auto completing $('#artist').autocomplete(function() { return artists; }), { matchContains: true }); however it does not work, any other way to achieve this ? thanks
[jQuery] Re: A part of .ajax I don't understand
And I'd recommend json_encode() in PHP and specifying 'json' as the datatype on the ajax call. Otherwise you may find the datae is not quite what you expect (likehaving a trailing space or \n, and so on. On Mar 8, 5:45 pm, James james.gp@gmail.com wrote: In your PHP script, you're suppose to print (echo) your response. Make sure to put an 'exit' afterwards so you don't continue processing the rest of your script and return (print) unexpected content. On Mar 8, 11:17 am, Ethan edgewood7...@gmail.com wrote: Hi out there. I'm having a little trouble with my .ajax. Here's the function: var name = $('#username').val(); var pass = $('#pass').val(); $.ajax({ url: 'signin.php', type: 'GET', data: 'username=' + name + 'pass=' + pass, success: function(submitreturn){ alert(submitreturn); } }); Here's signin.php: ?php require_once(classes/Login.php); $user = $_GET['username']; $pass = $_GET['pass']; $login = new Login(); if($login-login_user($user, md5(md5($pass) . POSTPASSKEY))) { return I DID IT;} else { return I DIDNT DO IT; } ? Okay, so here's my question. When the .ajax runs, the alert window contains the string that was in the username input, and br /. Why is this? Why isn't submitreturn the value that was returned by signin.php? How can I get the value returned by signin.php? Thanks for your help! -Ethan
[jQuery] Stripping last html tag within an area.
is it possible to use jQuery to strip a tag from a 'div' ? example: article phello world/p plast paragraph/p /article I would like strip the p tags from 'last paragraph'.
[jQuery] years in jQuery Datepicker
Hi, I'm using *jQuery Datepicker * http://keith-wood.name/datepick.html but, I can't show more years before 1999. please, somebody can help me? Saludos
[jQuery] Re: Stripping last html tag within an area.
Try this. $('articlep:last').replaceWith($(this).html()); On Mar 8, 7:22 pm, carbon carbon.ca...@gmail.com wrote: is it possible to use jQuery to strip a tag from a 'div' ? example: article phello world/p plast paragraph/p /article I would like strip the p tags from 'last paragraph'.
[jQuery] Re: Stripping last html tag within an area.
Thanks, but that didn't work. what does the .replaceWith($(this).htlm() do? shouldn't we use something like 'remove' instead? On Mar 9, 10:37 am, comslash.com comsl...@gmail.com wrote: Try this. $('articlep:last').replaceWith($(this).html()); On Mar 8, 7:22 pm, carbon carbon.ca...@gmail.com wrote: is it possible to use jQuery to strip a tag from a 'div' ? example: article phello world/p plast paragraph/p /article I would like strip the p tags from 'last paragraph'.
[jQuery] jQuery IE7 Memory leak
Hi! I'm having problems with all ajax updates, $(#element).load() etc., gradually eating up IE 7's memory. Simple test case to reproduce: http://mif86.com/memtest.htm It periodically loads another page's html content (http://mif86.com/ memtest2.htm) into a Div using jQuery's $(#element).load (memtest2.htm). If you watch the memory usage in internet explorer, it will grow linearly with time. I've been googling all around, trying lots of tweaks and fixes, but nothing seems to work. Is there something i'm misunderstanding, or is there a bug in jQuery? or something else? :S Thanks
[jQuery] Re: Stripping last html tag within an area.
Do you just want to remove the p and /p tags? Or do you want to remove the paragraph along with along with all of its contents? If the latter, then, yes, use ('article p:last').remove(); --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Mar 8, 2009, at 7:44 PM, carbon wrote: Thanks, but that didn't work. what does the .replaceWith($(this).htlm() do? shouldn't we use something like 'remove' instead? On Mar 9, 10:37 am, comslash.com comsl...@gmail.com wrote: Try this. $('articlep:last').replaceWith($(this).html()); On Mar 8, 7:22 pm, carbon carbon.ca...@gmail.com wrote: is it possible to use jQuery to strip a tag from a 'div' ? example: article phello world/p plast paragraph/p /article I would like strip the p tags from 'last paragraph'.
[jQuery] Re: Stripping last html tag within an area.
just the tags p, leaving the content 'last paragraph'. On Mar 9, 10:50 am, Karl Swedberg k...@englishrules.com wrote: Do you just want to remove the p and /p tags? Or do you want to remove the paragraph along with along with all of its contents? If the latter, then, yes, use ('article p:last').remove(); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 8, 2009, at 7:44 PM, carbon wrote: Thanks, but that didn't work. what does the .replaceWith($(this).htlm() do? shouldn't we use something like 'remove' instead? On Mar 9, 10:37 am, comslash.com comsl...@gmail.com wrote: Try this. $('articlep:last').replaceWith($(this).html()); On Mar 8, 7:22 pm, carbon carbon.ca...@gmail.com wrote: is it possible to use jQuery to strip a tag from a 'div' ? example: article phello world/p plast paragraph/p /article I would like strip the p tags from 'last paragraph'.
[jQuery] Re: jQuery IE7 Memory leak
I would have to guess that because you are using the .load() in such a rapid way that the load commands are stacking up, you will want to either increase your interval time or set something up that only one load command is going out at a time. On Mar 8, 7:42 pm, mif86 finsta...@gmail.com wrote: Hi! I'm having problems with all ajax updates, $(#element).load() etc., gradually eating up IE 7's memory. Simple test case to reproduce:http://mif86.com/memtest.htm It periodically loads another page's html content (http://mif86.com/ memtest2.htm) into a Div using jQuery's $(#element).load (memtest2.htm). If you watch the memory usage in internet explorer, it will grow linearly with time. I've been googling all around, trying lots of tweaks and fixes, but nothing seems to work. Is there something i'm misunderstanding, or is there a bug in jQuery? or something else? :S Thanks
[jQuery] Re: jQuery IE7 Memory leak
Ah, maybe a race condition occours or something, then. But it's strange that I can only see it happening in IE. I've modified the code to run another load() in the callback from the first load(), instead of periodically. It seems though, that it still keeps growing. I'll leave it on over night and check if it has grown out of my system memory by tomorrow! ( http://mif86.com/memtest3.htm ) Thanks mate :) On Mar 9, 12:58 am, comslash.com comsl...@gmail.com wrote: I would have to guess that because you are using the .load() in such a rapid way that the load commands are stacking up, you will want to either increase your interval time or set something up that only one load command is going out at a time. On Mar 8, 7:42 pm, mif86 finsta...@gmail.com wrote: Hi! I'm having problems with all ajax updates, $(#element).load() etc., gradually eating up IE 7's memory. Simple test case to reproduce:http://mif86.com/memtest.htm It periodically loads another page's html content (http://mif86.com/ memtest2.htm) into a Div using jQuery's $(#element).load (memtest2.htm). If you watch the memory usage in internet explorer, it will grow linearly with time. I've been googling all around, trying lots of tweaks and fixes, but nothing seems to work. Is there something i'm misunderstanding, or is there a bug in jQuery? or something else? :S Thanks
[jQuery] Re: Stripping last html tag within an area.
Try this ... I did some testing and it seems that the $(this) was not selecting correctly as before and the :last was selecting only the last p tag on the page not every the last p tag in each article $('articlep:last-child').each(function(){ $(this).replaceWith($(this).html()); }); Explination ... // selecting the last p tag in each article $('articlep:last-child') // for each of these p tags do ... .each(function(){ // the current object $(this) // replace the p tag with what ever is inside of the p tag including other html tags (ie strong) .replaceWith($(this).html()); // end the for each and selection }); On Mar 8, 7:55 pm, carbon carbon.ca...@gmail.com wrote: just the tags p, leaving the content 'last paragraph'. On Mar 9, 10:50 am, Karl Swedberg k...@englishrules.com wrote: Do you just want to remove the p and /p tags? Or do you want to remove the paragraph along with along with all of its contents? If the latter, then, yes, use ('article p:last').remove(); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 8, 2009, at 7:44 PM, carbon wrote: Thanks, but that didn't work. what does the .replaceWith($(this).htlm() do? shouldn't we use something like 'remove' instead? On Mar 9, 10:37 am, comslash.com comsl...@gmail.com wrote: Try this. $('articlep:last').replaceWith($(this).html()); On Mar 8, 7:22 pm, carbon carbon.ca...@gmail.com wrote: is it possible to use jQuery to strip a tag from a 'div' ? example: article phello world/p plast paragraph/p /article I would like strip the p tags from 'last paragraph'.
[jQuery] Call for contributors: A simple, fast and flexible grid/spreadsheet component.
Hey All, I've been working on a grid/spreadsheet control prototype during the last couple of weeks. Seeing how there doesn't seem to be a lot of other choices for this sort of thing, I had to write my own. I've put the project up on Google Code and am looking for experienced developers who can pick this up and turn it into something that everybody can use (a jQuery UI grid plugin?). The project is hosted at http://code.google.com/p/slickgrid/. Below is a copy of the project home page. Looking forward to your feedback! Michael Leibman michael.leib...@gmail.com Principal Engineer Daptiv Inc. -- SlickGrid What it is Quite simply, SlickGrid is a JavaScript grid/spreadsheet component. Some highlights: Virtual scrolling/rendering (hundreds of thousands of rows) Extremely fast rendering speed Configurable customizable Full keyboard navigation Resizable/reorderable columns Custom cell formatters editors Support for editing and creating new rows. GlobalEditorLock to manage concurrent edits in cases where multiple Views on a page can edit the same data. Why? This is pretty much a work-in-progress prototype, so I don't feel like spending a lot of time documenting it at this stage. I do think it is quite promising though, so I'm putting it up for everybody to see and play with. In its current form, it satisfies nearly all of the requirements for the project I am working on where I am utilizing it in an MVC application, so I'm not sure how much time I can afford on turning SlickGrid into something that would work for everybody. If you are willing to help out - let me know, and I'll add you to the project so that you can contribute. Examples Basic use: http://slickgrid.googlecode.com/svn/trunk/example1-simple.html Adding some formatting: http://slickgrid.googlecode.com/svn/trunk/example2-formatters.html Turning it into a spreadsheet: http://slickgrid.googlecode.com/svn/trunk/example3-editing.html A more comprehensive test page: http://slickgrid.googlecode.com/svn/trunk/grid.html Documentation See comments at the top of http://slickgrid.googlecode.com/svn/trunk/slick.grid.js.
[jQuery] Re: getJSON url variable broken
My guess is that you could still do it if you globally set async to false. Wouldn't recommend it though. David James wrote: Yes, David is right. My example would not work. Sorry about that. For other jQuery AJAX functions, there's an option to set 'async' to false if you do want to let your script halt until the AJAX response is received. I don't think there's an option for getJSON for that, so you'll have to do everything you need to do inside your callback, or switch to using the $.ajax() function. On Mar 5, 5:00 pm, David Muir davidkm...@gmail.com wrote: You need to include what you want to do within the callback: $(function(){ var youtubeurl; $.getJSON('data.inc.json', function(j){ youtubeurl = j.video_url; so = new SWFObject(j.video_url, TEST, 498, 278, 9.0.28,#00, true); //etc... }); //lines here don't wait for the ajax call to complete before executing. alert(typeof youtubeurl); //should alert undefined }); Yes, youtubeurl will be set, but only after you get the response back from the server, which happens long after the lines after $.getJSON() get executed. josp wrote: that's not the problem unfortunately, cause my real script is different. The problem must be connected to the way $.getJSON parses the data On 5 Mrz., 21:11, James james.gp@gmail.com wrote: The scope of your youtubeurl variable exists only within the callback function of your getJSON(). Set the variable outside first. $(function(){ var youtubeurl; $.getJSON('data.inc.json', function(j){ youtubeurl = j.video_url; }); so = new SWFObject(youtubeurl, TEST, 498, 278, 9.0.28, #00, true); }); On Mar 5, 7:54 am, josp superbla3...@googlemail.com wrote: hello, I have a file data.inc.json with the variable { 'video_url':'http://www.youtube.com/v/ididididhl=defs=1' } which I open from my javascript by $.getJSON( data.inc.json, function(j){ var youtubeurl = j [video_url]; }); The value of the variable youtubeurl looks correct (http://www.youtube.com/v/ididididhl=defs=1), but when I want to use the url for another request, nothing happens. If I want to load the youtube video like this so = new SWFObject(youtubeurl, TEST, 498, 278, 9.0.28, #00, true); nothing happens. If I do var testvar = http://www.youtube.com/v/ididididhl=defs=1;; so = new SWFObject(testvar, TEST, 498, 278, 9.0.28, #00, true); the video is loaded and plays. Do I have to format the j[video_url]? all the best Josp
[jQuery] cancelling default click handler for label/
I have markup that looks like this: div id=phrase:witness%2Bwhereof class=as-s-comp label class=checkbox title=witness whereof input type=checkbox value=witness whereof/ witness whereof /label a class=cl href=#(4104)/a /div When I click anywhere within the label, the checkbox toggles from its previous state. I'd like to cancel this behavior, so that clicking within the label has no effect on the checkbox. How would I use jQuery to accomplish this? Thanks in advance for any help with this. --Bill
[jQuery] Re: Stripping last html tag within an area.
thats perfect! thanks comslash! On Mar 9, 11:29 am, comslash.com comsl...@gmail.com wrote: Try this ... I did some testing and it seems that the $(this) was not selecting correctly as before and the :last was selecting only the last p tag on the page not every the last p tag in each article $('articlep:last-child').each(function(){ $(this).replaceWith($(this).html()); }); Explination ... // selecting the last p tag in each article $('articlep:last-child') // for each of these p tags do ... .each(function(){ // the current object $(this) // replace the p tag with what ever is inside of the p tag including other html tags (ie strong) .replaceWith($(this).html()); // end the for each and selection }); On Mar 8, 7:55 pm, carbon carbon.ca...@gmail.com wrote: just the tags p, leaving the content 'last paragraph'. On Mar 9, 10:50 am, Karl Swedberg k...@englishrules.com wrote: Do you just want to remove the p and /p tags? Or do you want to remove the paragraph along with along with all of its contents? If the latter, then, yes, use ('article p:last').remove(); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 8, 2009, at 7:44 PM, carbon wrote: Thanks, but that didn't work. what does the .replaceWith($(this).htlm() do? shouldn't we use something like 'remove' instead? On Mar 9, 10:37 am, comslash.com comsl...@gmail.com wrote: Try this. $('articlep:last').replaceWith($(this).html()); On Mar 8, 7:22 pm, carbon carbon.ca...@gmail.com wrote: is it possible to use jQuery to strip a tag from a 'div' ? example: article phello world/p plast paragraph/p /article I would like strip the p tags from 'last paragraph'.
[jQuery] Re: A part of .ajax I don't understand
Got it! thank you guys so much On Mar 8, 7:05 pm, donb falconwatc...@comcast.net wrote: And I'd recommend json_encode() in PHP and specifying 'json' as the datatype on theajaxcall. Otherwise you may find the datae is not quite what you expect (likehaving a trailing space or \n, and so on. On Mar 8, 5:45 pm, James james.gp@gmail.com wrote: In your PHP script, you're suppose to print (echo) your response. Make sure to put an 'exit' afterwards so youdon'tcontinue processing the rest of your script and return (print) unexpected content. On Mar 8, 11:17 am, Ethan edgewood7...@gmail.com wrote: Hi out there. I'm having a little trouble with my .ajax. Here's the function: var name = $('#username').val(); var pass = $('#pass').val(); $.ajax({ url: 'signin.php', type: 'GET', data: 'username=' + name + 'pass=' + pass, success: function(submitreturn){ alert(submitreturn); } }); Here's signin.php: ?php require_once(classes/Login.php); $user = $_GET['username']; $pass = $_GET['pass']; $login = new Login(); if($login-login_user($user, md5(md5($pass) . POSTPASSKEY))) { return I DID IT;} else { return I DIDNT DO IT; } ? Okay, so here's my question. When the .ajaxruns, the alert window contains the string that was in the username input, and br /. Why is this? Why isn't submitreturn the value that was returned by signin.php? How can I get the value returned by signin.php? Thanks for your help! -Ethan
[jQuery] Re: cancelling default click handler for label/
is there any reason why you couldn't use a span instead of a label ? On Mar 8, 8:57 pm, Bill bllfr...@gmail.com wrote: I have markup that looks like this: div id=phrase:witness%2Bwhereof class=as-s-comp label class=checkbox title=witness whereof input type=checkbox value=witness whereof/ witness whereof /label a class=cl href=#(4104)/a /div When I click anywhere within the label, the checkbox toggles from its previous state. I'd like to cancel this behavior, so that clicking within the label has no effect on the checkbox. How would I use jQuery to accomplish this? Thanks in advance for any help with this. --Bill
[jQuery] Re: Need Help with changing css on an object
phpbutcher wrote: Charlie is absolutely right. You can simplify it by using the css :hover to do your rollover states. You still however need to do something on top of that to handle the current problem you're having with it keeping the state change when a user clicks on one of the nav elements. That's really where my thought process was in my post. Thanks for your suggestions. I am already using a hover state in my css, so I have that covered. I wanted to keep the text on the buttons as images, because it's a custom font and also if I make just the lightbulb as the link, then the user can't click on the text to use it as a link. He/She would have to click on the lightbulb. Am I wrong in thinking that? Any suggestions? As far as my original problem goes, I added a class in the css called 'lit' to the button's span as they're the ones with the background-image. This is what I wrote in my CSS: #printsectbtn span { background-image: url(../images/print_off.png); } #printsectbtn span:hover { background-image: url(../images/print_on.png); } #printsectbtn span.lit { background-image: url(../images/print_on.png); } #websectbtn span { background-image: url(../images/web_off.png); } #websectbtn span:hover { background-image: url(../images/web_on.png); } #websectbtn span.lit { background-image: url(../images/web_on.png); } #motsectbtn span { background-image: url(../images/motion_off.png); } #motsectbtn span:hover { background-image: url(../images/motion_on.png); } #motsectbtn span.lit { background-image: url(../images/motion_on.png); } #intsectbtn span { background-image: url(../images/int_off.png); } #intsectbtn span:hover { background-image: url(../images/int_on.png); } #intsectbtn span.lit { background-image: url(../images/int_on.png); } This is what I wrote in my jquery: $(function(){ $('#printsectbtn span').addClass('lit'); $('#nav li a').click(function(){ var clickedLinkId = $(this).attr('id'); $('#nav li a span').removeClass('lit'); $('#' + clickedLinkId + ' span').addClass('lit'); return false; }); }); So basically when the user clicks on one of the buttons, it adds the class 'lit' which changes the background-image to what I specified in the css for each different button. It also removes the class 'lit' from all of the button's spans, which changes the background image back to the lightbulb being off. -- View this message in context: http://www.nabble.com/Need-Help-with-changing-css-on-an-object-tp22394562s27240p22405547.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Need Help with changing css on an object
I will definitely add sprites though, I forgot to mention that. Thanks for that suggestion. -- View this message in context: http://www.nabble.com/Need-Help-with-changing-css-on-an-object-tp22394562s27240p22405565.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: cancelling default click handler for label/
Actually, no. Thanks for the simplification! On Mar 8, 6:12 pm, MorningZ morni...@gmail.com wrote: is there any reason why you couldn't use a span instead of a label ? On Mar 8, 8:57 pm, Bill bllfr...@gmail.com wrote: I have markup that looks like this: div id=phrase:witness%2Bwhereof class=as-s-comp label class=checkbox title=witness whereof input type=checkbox value=witness whereof/ witness whereof /label a class=cl href=#(4104)/a /div When I click anywhere within the label, the checkbox toggles from its previous state. I'd like to cancel this behavior, so that clicking within the label has no effect on the checkbox. How would I use jQuery to accomplish this? Thanks in advance for any help with this. --Bill
[jQuery] Re: cancelling default click handler for label/
And why is the input within the label? I was under the impression that the correct format is: labelMy Label/labelinput type=checkbox / To have the label select the checkbox: label for=my-checkboxMy Label/labelinput id=my-checkbox type=checkbox / David MorningZ wrote: is there any reason why you couldn't use a span instead of a label ? On Mar 8, 8:57 pm, Bill bllfr...@gmail.com wrote: I have markup that looks like this: div id=phrase:witness%2Bwhereof class=as-s-comp label class=checkbox title=witness whereof input type=checkbox value=witness whereof/ witness whereof /label a class=cl href=#(4104)/a /div When I click anywhere within the label, the checkbox toggles from its previous state. I'd like to cancel this behavior, so that clicking within the label has no effect on the checkbox. How would I use jQuery to accomplish this? Thanks in advance for any help with this. --Bill
[jQuery] Re: years in jQuery Datepicker
Looking at the Configuration tab, you can set the value date:minDate and that should do the trick On Mar 8, 7:14 pm, Javier Guerrero demix...@gmail.com wrote: Hi, I'm using *jQuery Datepicker *http://keith-wood.name/datepick.html but, I can't show more years before 1999. please, somebody can help me? Saludos
[jQuery] Re: cancelling default click handler for label/
having the input inside the label is perfectly valid. http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1 To associate a label with another control implicitly, the control element must be within the contents of the LABEL element. In this case, the LABEL may only contain one control element. The label itself may be positioned before or after the associated control. I don't prefer doing it this way for my own sites, but it's not incorrect. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Mar 8, 2009, at 9:49 PM, David Muir wrote: And why is the input within the label? I was under the impression that the correct format is: labelMy Label/labelinput type=checkbox / To have the label select the checkbox: label for=my-checkboxMy Label/labelinput id=my-checkbox type=checkbox / David MorningZ wrote: is there any reason why you couldn't use a span instead of a label ? On Mar 8, 8:57 pm, Bill bllfr...@gmail.com wrote: I have markup that looks like this: div id=phrase:witness%2Bwhereof class=as-s-comp label class=checkbox title=witness whereof input type=checkbox value=witness whereof/ witness whereof /label a class=cl href=#(4104)/a /div When I click anywhere within the label, the checkbox toggles from its previous state. I'd like to cancel this behavior, so that clicking within the label has no effect on the checkbox. How would I use jQuery to accomplish this? Thanks in advance for any help with this. --Bill
[jQuery] unintrusive jQuery on Rails
Hello folks, I'm trying to integrate jQuery within a Rails application (instead scriptaculous+prototype) and I would like to make it unintrusive and I have already an issue with that. I'm using fancyzoom: a href=#small_box id=smallSmall Box!/a div id=small_box pHere is the contents that will appear in the zoom./p /div script type=text/javascript $('#small').fancyZoom(); /script and I wish to put $('#small').fancyZoom(); within my application.js file but how can I call it when the contents are loaded? If I use $(document).ready(function() { $('#small').fancyZoom(); };) the code is executed after the DOM is loaded but before the contents are loaded so it doesn't work. THANKS FOR YOUR HELP.
[jQuery] Using .ajax to do XMLRPC - I must be doing something very stupid
Hi So my first time using jQuery. http://paste.pocoo.org/show/107037/ I have a simple django based xml-rpc server which works perfect when I test it with my python based XML-rpc client. I am always getting error when sending data using jQuery. When I set processData: true - the server is getting value as: var1=val1var2=val2 as a consequence of which my dispatcher in the server side fails with XML parsing error. If I set processData: false, then POST content is just ''. Looks like jquery is not serializing the data to XML. I did lot of Googling (maybe I didnt do enough) and nowhere I found a similar error. Though it threw up: http://drupalbin.com/1173 which is doing the serializing by itself. I am doubtful if this is required. Thoughts?
[jQuery] Re: Jquery ajax doesn't work in firefox on my site, once it used to be.
Thank James for your reply. It's so strange that it has error in my browser (Firefox 3.0.7). And I can see the error message through firebug as following: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; HTMLHEADMETA HTTP-EQUIV=Content-Type CONTENT=text/html; charset=iso-8859-1 TITLEERROR: The requested URL could not be retrieved/TITLE STYLE type=text/css!--BODY{background-color:#ff;font-family:verdana,sans-serif}PRE{font-family :sans-serif}--/STYLE /HEADBODY H1ERROR/H1 H2The requested URL could not be retrieved/H2 HR noshade size=1px P While trying to process the request: PRE POST /index.php/guessword/get_definition HTTP/1.1 Host: guessword.dictionary2gether.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0 .7 Accept: application/json, text/javascript, */* Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive X-Requested-With: XMLHttpRequest Referer: http://guessword.dictionary2gether.com/ Cookie: __utma=72009989.3883592479017364000.1236397135.1236397135.1236562223.2; __utmz=72009989.1236397135 .1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=12060833.4295314544253203500.1236400093.1236400093 .1236562704.2; __utmz=12060833.1236400093.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); ci_session =a%3A4%3A%7Bs%3A10%3A%22session_id%22%3Bs%3A32%3A%224486fa23e506b5d344ad93d3e2aa754f%22%3Bs%3A10%3A%22ip_address %22%3Bs%3A14%3A%22118.67.200.214%22%3Bs%3A10%3A%22user_agent%22%3Bs%3A50%3A%22Mozilla%2F5.0+%28Windows %3B+U%3B+Windows+NT+6.0%3B+en-US%3B+rv%22%3Bs%3A13%3A%22last_activity%22%3Bs%3A10%3A%221236563299%22 %3B%7Dee1fd93bbb91d4953cb2c09ac0606b1a; __utmb=72009989.6.10.1236562223; __utmc=72009989; __utmb=12060833 .4.10.1236562704; __utmc=12060833 Pragma: no-cache Cache-Control: no-cache /PRE P The following error was encountered: UL LI STRONG Invalid Request /STRONG /UL P Some aspect of the HTTP Request is invalid. Possible problems: UL LIMissing or unknown request method LIMissing URL LIMissing HTTP Identifier (HTTP/1.0) LIRequest is too large LIContent-Length missing for POST or PUT requests LIIllegal character in hostname; underscores are not allowed /UL PYour cache administrator is mailto:webmaster webmaster . BR clear=all HR noshade size=1px ADDRESS Generated Mon, 09 Mar 2009 08:50:18 GMT by proxy (squid/2.5.STABLE11) /ADDRESS /BODY/HTML James-279 wrote: I can't read the word of the language to guess, but it seems to be working fine in FF3.0.7. No errors. On Mar 6, 7:11 pm, Makara Kao makara...@gmail.com wrote: Hello everyone, Recently I have just created a site using CodeIgniter with JQuery. And in the past, it worked just fine. But recently I don't know why I got error message in FireFox(3.0.6) through firebug and there is no result displayed in my site. However, it works just fine in IE and other browsers. Are there any suggestions or solutions? The site ishttp://guessword.dictionary2gether.com/ Sorry, this is the duplicate post, cos I couldn't find the solution yet. Hope someone can help. Thanks, Makara -- View this message in context:http://www.nabble.com/Jquery-ajax-doesn%27t-work-in-firefox-on-my-sit... Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Jquery-ajax-doesn%27t-work-in-firefox-on-my-site%2C-once-it-used-to-be.-tp22384573s27240p22407069.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Using .ajax to do XMLRPC - I must be doing something very stupid
jQuery doesn't include XML serialisation in it's core. A quick search of the plugins repository came up with two projects that might help (there may be more): RPC http://plugins.jquery.com/project/rpc The is rpc(remote procedure call) client implementation based on JQuery. It creates an rpc object and adds ability to call them. It supports both xml and json rpc... XML http://plugins.jquery.com/project/xml Methods to generate XML/HTML tags programmatically. By default, they output XHTML compliant tags. Karl Rudd On Mon, Mar 9, 2009 at 1:18 PM, riteshn rite...@gmail.com wrote: Hi So my first time using jQuery. http://paste.pocoo.org/show/107037/ I have a simple django based xml-rpc server which works perfect when I test it with my python based XML-rpc client. I am always getting error when sending data using jQuery. When I set processData: true - the server is getting value as: var1=val1var2=val2 as a consequence of which my dispatcher in the server side fails with XML parsing error. If I set processData: false, then POST content is just ''. Looks like jquery is not serializing the data to XML. I did lot of Googling (maybe I didnt do enough) and nowhere I found a similar error. Though it threw up: http://drupalbin.com/1173 which is doing the serializing by itself. I am doubtful if this is required. Thoughts?
[jQuery] Help with selectors and :not()
Hi, I'm trying to get all table rows on a page that have an id that starts with the letter r, but not any table rows that have id's which contain the word review. I've tried to use the :not() method, but I don't think I'm using it correctly as it doesn't seem to be filtering out table rows that have id's which contain the word review. My attempt: $('#replies tr[id^=r]:not(tr[id^=review])'); I've figured out how to do it with regular xpath, but I'm not sure how to convert that to a jQuery selector statement. var mems = document.evaluate( '//tr[contains(@id, r)][ not(contains(@id, review) )]' ,document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); for (var l = 0; l mems.snapshotLength; l++){ console.log(mems.snapshotItem(l)); } -- View this message in context: http://www.nabble.com/Help-with-selectors-and-%3Anot%28%29-tp22407206s27240p22407206.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Ajax get is not working in IE
Hi All, Please help!! Thanks | Kranthi On Mar 5, 4:00 pm, Kranthi kranthi@gmail.com wrote: Hi All, I am new to JQuery. I tried this example from http://www.webmonkey.com/tutorial/Easy_XML_Consumption_using_jQuery This works fine in Firefox but in IE I am not able to see the data. Also, if namespaces are used in XML, how should I handle? Thanks |Kranthi
[jQuery] Re: search nodes in XML
Hi All, Please help!! Thanks | Kranthi On Mar 5, 4:09 pm, Kranthi kranthi@gmail.com wrote: Hi All, I have a employees.xml, which contains employee nodes. No in my HTML I should have a text box and a seach button. Input value is sth like G% or Go%. I need to display all the matching values like Google, google etc., in a table. Is it possible to get this kind of output? Please help. Thanks |Kranthi