[jQuery] Re: open content in new window?
Please correct me if I am wrong as I am no expert, but I don't think there is anything particularly about new windows and such in jQuery, but just regular JavaScript and being able to set the context of the jQuery selector method makes it a little easier. For example: http://jsbin.com/ibiha [Code-ish] html script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3/jquery.min.js/script script type=text/javascript $(function() { $(#demo_button).click(function(e) { myWindow=window.open ('','MyNewWindow','width=200,height=100,left=200,top=100'); myWindow.document.write('!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd;html xmlns=http:// www.w3.org/1999/xhtmlheadtitleI am a new Window!/title/ headbodyh2This is a Heading/h2pHere is a paragraph tag full of nonsense and tomfoolery./p/body/html'); myWindow.document.close(); $('h2', myWindow.document).css('color', 'red'); $(.demo).append('divinput type=button id=affect_new_window value=Now click me//div'); $('#affect_new_window').click(function(e) { $('p', myWindow.document).text('See the text changed, isn\'t that neat!'); }); }); }); /script /head body div class=demo input type=button id=demo_button value=Click Me/ /div!-- End demo -- /body /html [/code] Setting the context of the Selector to the new windows document is really easy and makes editing the new window with jQuery a breeze. Anyway I hope the example is helpful. - BigAB On May 25, 1:18 pm, GravyFace gravyf...@gmail.com wrote: On Mon, May 25, 2009 at 3:07 PM, Caires Vinicius caire...@gmail.com wrote: The contente of new window opened is dynamically generated? Or is html u already have it? dynamically-generated.
[jQuery] Re: open content in new window?
Please correct me if I am wrong as I am no expert, but I don't think there is anything particularly about new windows and such in jQuery, but just regular JavaScript and being able to set the context of the jQuery selector method makes it a little easier. For example: http://ca.geocities.com/adamlbarrett/example.html (Please ignore the Yahoo Ads, I tried to use JSbin but it messed up the code.) [Code] html script type=text/javascript src=http://ajax.googleapis.com/ ajax/libs/jquery/1.3/jquery.min.js/script script type=text/javascript $(function() { $(#demo_button).click(function(e) { myWindow=window.open ('','MyNewWindow','width=200,height=100,left=200,top=100'); myWindow.document.write('htmlheadtitleI am a new Window!/ title/headbodyh2This is a Heading/h2pHere is a paragraph tag full of nonsense and tomfoolery./p/body/html'); myWindow.document.close(); $('h2', myWindow.document).css('color', 'red'); $(.demo).append('divinput type=button id=affect_new_window value=Now click me//div'); $('#affect_new_window').click(function(e) { $('p', myWindow.document).text('See the text changed, that is neat and easy.'); myWindow.focus(); }); }); }); /script /head body div class=demo input type=button id=demo_button value=Click Me/ /div!-- End demo -- /body /html [/code] Setting the context of the Selector to the new windows document is really easy and makes editing the new window with jQuery a breeze. Anyway I hope the example is helpful. - BigAB On May 25, 1:18 pm, GravyFace gravyf...@gmail.com wrote: On Mon, May 25, 2009 at 3:07 PM, Caires Vinicius caire...@gmail.com wrote: The contente of new window opened is dynamically generated? Or is html u already have it? dynamically-generated.
[jQuery] Re: scrollUp and scrollDown mis-aligning text on IE
Hi JQuery, ok. let me ask a question in another direction.. the example I have http://marino.dk/test_a/ http://marino.dk/test_a/shows the basic idea what I want a form to be able to do... I want to be able to add extra emails and telephone numbers for each contact ... and it should be able to create extra contacts too. creating such a form has shown itself to be very complicated, perhaps there is something like this already created? can anyone point me in the right direction? regards, Peter On Mon, May 25, 2009 at 1:57 PM, Peter Marino marino.pe...@gmail.comwrote: Hi all, I'm still stuck on this problem? is the code too complicated? regards, Crisium On Sun, May 24, 2009 at 7:08 PM, Crisium marino.pe...@gmail.com wrote: Hi jQuery, I have created a little demo here: http://marino.dk/test_a/ when you add a contact a new one scrolls down..you have the option to remove it too and it scrolls up. but the problem is when doing this in IE the text looks like it's in absolute positions to the page and not the contact. try adding and removing a contact in IE you should see the problem I have tried this with firefox and chrome and they do not have this problem. any suggestions? regards, Crisium Peter Wraae Marino -- Power Tumbling - http://www.powertumbling.dk OSG-Help - http://osghelp.com -- Power Tumbling - http://www.powertumbling.dk OSG-Help - http://osghelp.com
[jQuery] Re: Superfish with multicolumn sub navigation
That's great news. Would be interested to see the final product. Are there any hints you can give me or point me to a file I can be focusing my attention to achive this? It's a custom made script where you can choose what child you want to target, something superfish doesn't have but would be very welcome.
[jQuery] Re: Pass var to click event
the test your calling is the one you defined for the function try var test = 'Works!'; $('#action_confirm').click(function(){ alert(test); });
[jQuery] Re: Superfish with multicolumn sub navigation
Hi Hetneo, Its easy to get that kind of menu using javascript / jquery code. See they have written plugin based on ul li. Now here is a solution like Ischa I guess ;) Step : 1 - Create Main menu div menu1,menu2,menu3,etc 2 - Create another menu below each menu div [menu1 - sub-menu1] 3 - Use 'hover' function of jquery or 'onmouseover / onmouseout' of javascript 3 - Within 'hover' or 'onmouseover/onmouseout' function you need to hide / unhide your divs 4 - Use any function like fadeIn,fadeOut,slideUp,slideUp to toggle your menu. Or you can do it via css like twitter people did. cheers, On Tue, May 26, 2009 at 12:15 PM, Ischa Gast cont...@ischagast.nl wrote: That's great news. Would be interested to see the final product. Are there any hints you can give me or point me to a file I can be focusing my attention to achive this? It's a custom made script where you can choose what child you want to target, something superfish doesn't have but would be very welcome. ---| Regard |--- Mohammad.Tareque
[jQuery] jQuery, the Ready Function, and Other Javascript - A Dirt Simple Inquiry
QUESTION: What is the general rule for using the Ready function in the presence of other Javascript? BACKGROUND: I have recently discovered that my previous problems with the customization of the jQ Impromptu plug-in could be overcome through isolation. In effect, I removed my script from the targeted document, eliminated all of my self-created jQuery methods with the exception of one, and tried the package in a different, separate document. Everything functioned as intended. With renewed confidence I am now ready to return the package to the originally targeted document. This is where you may be able to help. Please examine the script below and note that I am using the Ready function in combination with other script tags. I have organized the script tags according to use or non-use with the Ready function. Everything before the Ready function is called either directly or indirectly by the Ready function. Everything after it is not. Do you see a possible source of error? link href=../SpryAssets/SpryAccordion.css rel=stylesheet type=text/css / link href=../SpryAssets/SpryMenuBarHorizontal.css rel=stylesheet type=text/css / link href=../CSS/imagine.css rel=stylesheet type=text/css / link href=../CSS/jQ_Impromptu.css rel=stylesheet type=text/css / script src=../JavaScript/jQuery-1.3.2-vsdoc2.js type=text/ javascript/script script src=../JavaScript/errorMessages.js type=text/javascript/ script script src=../JavaScript/popUpBoxConfiguration.js type=text/ javascript/script script src=../JavaScript/jQ_browserIdentification.js type=text/ javascript/script script src=../JavaScript/jQ_Impromptu-2.5.js type=text/ javascript/script script src=../JavaScript/jQ_Imagine.js type=text/javascript/ script script src=../JavaScript/SVG_roundies_0.0.2a.js type=text/ javascript/script script type=text/javascript $(document).ready(function() { $('#today').toDate(); $('#clock').JSClock(); $('#duration').timePassed(); $('body').SVG_RoundiesIntializer(); $().getBrowserInformation(); }); /script script src=../SpryAssets/SpryAccordion.js type=text/javascript/ script script src=../SpryAssets/SpryMenuBar.js type=text/javascript/ script Roddy
[jQuery] Re: Autoselect a checkbox on user's input value
Try this: $(function(){ $('#DNnumber').keyup(function(){ if (parseInt($(this).val()) 40) { $('#external').attr(checked, checked); $('#internal').attr(checked, ); } else { $('#external').attr(checked, ); $('#internal').attr(checked, checked); } }); }); on 25/05/2009 13:51 ciupaz said:: Hi all, I have two checkboxes like these ones: span input name=place id=internal type=checkbox value=internal /Internal (up to DN 40)br / input name=place id=external type=checkbox value=external /External (over DN 40) /span and a textbox like this: Insert the DN number: input name=DNnumber id=DNnumber type=text / I'd like a sort of validation that when the user insert a DN number greater than 40, the checkbox external will be automatically selected (without change it). How can I accomplish this? Thanks a lot. Luigi
[jQuery] Re: Superfish with multicolumn sub navigation
Hi Mohammad, You're exactly right. That's is the functionality of the superfish extension for Joomla. I found this tutorial very helpful: http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-with-jquery/ In this case however, superfish ( http://users.tpg.com.au/j_birch/plugins/superfish/ ) is far advanced than that tutorial and I am looking to extend the functionality of the tutorial into superfish. Say for example you have three levels of menu menu-level-1, menu- level-2, menu-level-3. When you hover over menu-level-1, I want superfish to display both menu-level-2 and menu-level-3 levels for all menu items on levels two and three. I had hoped someone had achived this to save me some time :). Any ideas? Many thanks, Charles On May 26, 5:16 pm, Mohd.Tareq tareq.m...@gmail.com wrote: Hi Hetneo, Its easy to get that kind of menu using javascript / jquery code. See they have written plugin based on ul li. Now here is a solution like Ischa I guess ;) Step : 1 - Create Main menu div menu1,menu2,menu3,etc 2 - Create another menu below each menu div [menu1 - sub-menu1] 3 - Use 'hover' function of jquery or 'onmouseover / onmouseout' of javascript 3 - Within 'hover' or 'onmouseover/onmouseout' function you need to hide / unhide your divs 4 - Use any function like fadeIn,fadeOut,slideUp,slideUp to toggle your menu. Or you can do it via css like twitter people did. cheers, On Tue, May 26, 2009 at 12:15 PM, Ischa Gast cont...@ischagast.nl wrote: That's great news. Would be interested to see the final product. Are there any hints you can give me or point me to a file I can be focusing my attention to achive this? It's a custom made script where you can choose what child you want to target, something superfish doesn't have but would be very welcome. ---| Regard |--- Mohammad.Tareque
[jQuery] Re: jQuery Timers Loop
Try this. It is using jQuerys offset() method to get the current elements position. This way you do not have to create a class for each position you need to to be in. Let JQuery figure that part out. You will probably have to tweak the css offset a bit to get it to sit exactly where you want over the ul. eg. top: offset.top - 15, left: offset.left - 25 script type=text/javascript $(#myol).everyTime(4000, myrotate, function() { var $this = $(this), $thisli = $this.find(li), offset; $this.data(currentshow, $this.data(currentshow) || 0); offset = $thisli.removeClass(on).eq($this.data(currentshow)) .addClass(on) .offset(); $(#arrow) .css({ top: offset.top - 15, left: offset.left - 25 }) .show(); $this.data(currentshow, $this.data(currentshow) === $thisli.length ? 0 : $this.data(currentshow) + 1); }); /script On May 26, 12:21 am, MauiMan2 cmzieba...@gmail.com wrote: Hmm, I think that might work. Now just have to tinker w/ it a bit to get the arrow to animate as well. Thanks, Pepperman! On May 25, 7:57 pm, Pepperman chorno...@gmail.com wrote: I had to do something like this recently. Try this: ol id=myol liWe establish, through the Secretary of State, a Corporation in any state you choose as your home base of operations./li liWe customize a 401k plan that can invest in your corporate stock and traditional investments./li liOur experts help you roll over your retirement funds into the 401k plan that you control./li liThe 401k makes a direct purchase of your corporate stock, infusing your corporation with cash./li liWe help you set up a Corporate Bank Account with checkbook control of your corporate funds./li /ol script type=text/javascript $(#myol).everyTime(4000, myrotate, function() { var $this = $(this), hlen = $this.find(li).length; $this.data(currentshow, $this.data(currentshow) || 0); $this.find(li).removeClass(on) .eq($this.data(currentshow)) .addClass(on); $this.data(currentshow, $this.data(currentshow) === hlen ? 0 : $this.data(currentshow) + 1);}); /script On May 25, 5:28 pm, MauiMan2 cmzieba...@gmail.com wrote: I've used the jQuery Timers plugin (http://plugins.jquery.com/project/ timers) to animate through my client's five steps on this page:http://www.cmzmedia.com/irarollover/butisthere a way to get it to continuously loop through the animation? The documentation page (http://jquery.offput.ca/timers/) doesn't seem to cover anything like that. Thanks in advance.
[jQuery] Re: Rollover Effects instead of alternate images
it recognizes an a:hover though, so display:block and use that as the trigger. it's more semantically meaningful than making a div a link anyway. On May 23, 7:04 pm, waseem sabjee waseemsab...@gmail.com wrote: yes. however sometimes the jquery method is needed for IE6 as IE6 won't recognize a div:hover or li:hover but in this situation css only works best. On Sat, May 23, 2009 at 6:42 PM, Karl Swedberg k...@englishrules.comwrote: The OP is asking about a very simple link rollover. Since it appears people aren't taking RobG's advice and looking up CSS rollovers on Google, here is a quick demonstration: http://test.learningjquery.com/css-background-image.html On May 22, 2009, at 2:41 PM, Andy Matthews wrote: I believe your CSS is invalid. I don't think you can apply both a class AND an ID in the same selector which is what #base-state.active does. The CSS is perfectly valid, as you can see if you copy and paste it in here:http://jigsaw.w3.org/css-validator/#validate_by_input Now #base-state:active might work as that's a pseudo class. The :hover pseudo-class will work just fine. If you want the state to change when the user tabs onto the link, then use :focus as well. As others have already noted, this requires absolutely no jQuery/JavaScript whatsoever. For IE6, however, if you're getting a flash in between states, you'll want to add the following somewhere in the head (or reference a script file that does the same): !--[if lte IE 6] script type=text/javascript try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {} /script ![endif]-- -Original Message- Behalf Of ButtersRugby Then in your css, #base-state {background-position: 0px 0px;} // The first 0 is the X axis position, the second is the Y #base-state.active {background-position: 0px 30px;} // This is our second class that we will switch to with our jquery You probably meant to use a negative number for the y axis on #base-state.active #base-state.active {background-position: 0px -30px;} $(document).ready(function() { $(#base-state).click(function() { $(this).toggleClass(active); } ) }); The OP wanted the state to change on hover, not click. Anyway, jQuery is not necessary. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Re: JQuery Treeview - Display sub nodes when mouse over menu
is tree expanding on CLICK...what are u doing to expand it...i mean are u calling a function or a CSS class...if u are calling a function u can override the HOVER function if u r jst changing the CSS u can change the CSS on hover.. Regards; Zeeshan Ahmed Khan On Tue, May 26, 2009 at 10:51 AM, eclipseTalk echal...@yahoo.com wrote: Thanks, but it's not exacltly what I need. I basically need to override hover to behave as the click event. How can I do that in JQuery? Thanks for helping me out here On May 25, 5:17 pm, kiusau kiu...@mac.com wrote: Have you tried here: http://docs.jquery.com/Traversing/children#expr Roddy On May 25, 1:55 pm, eclipseTalk echal...@yahoo.com wrote: Hello, I'd like to display the children nodes when the mouse over the parent node. What is the best way to achieve that? Any help is appreciated. Thank you for your time.- Hide quoted text - - Show quoted text -
[jQuery] Re: JQuery UI Accordion Plugin
Firebug will allow you to see the HTML that is being updated dynamically by jQuery. http://getfirebug.com/ I had an issue with the accordion script flaking before, it turned out to be an extra /div in my HTML. It is a good idea to test the scripts in a barebones template to verify it is not your own HTML causing the issues. More often than not, it is not the plugins causing the issue. On May 25, 8:51 pm, Danny Nolan danny_no...@yahoo.co.uk wrote: First is the code you cant see. Any and all post document ready changes are not visible by view page source. Instead, select the object with your mouse, right click, and view selection source. As for the accordion, not so sure there! --- On Mon, 5/25/09, Bharat bcrupa...@yahoo.com wrote: From: Bharat bcrupa...@yahoo.com Subject: [jQuery] JQuery UI Accordion Plugin To: jQuery (English) jquery-en@googlegroups.com Date: Monday, May 25, 2009, 6:55 PM I am a Rails developer and new to jQuery so this may be a naive question: I am using jQuery Accordion plugin in my project and it is working, but now I am trying to tweak it and do not know how to: So I have a page that displays comments as a stack of accordion folds. This is the code in my application.html.erb (master layout) file: $(#accordion).accordion({ autoHeight: false, event: 'mouseover' }); This works fine. There is a Rails form on this page where I allow the users to create a comment, and submit it. Upon submission, the prepends the notes record as shown below: $(#accordion).prepend(%= escape_javascript(render(:partial = 'shared/comment', :object = @comment)) %); $(#new_comment)[0].reset(); What is totally confusing me is that this is showing on the page, but is not a part of the accordion. As a matter of fact, when I view the page source, the entry is not even there on the page, yet it is being shown in the browser. How could that be? There is something fundamental that I am missing here. Kindly explain. Thanks. Bharat
[jQuery] Re: The Assignment of Functions to Tags that Are Not jQuery Methods
I think that depends on if the methods need to be available globally of not. This is also up to personal preferences. I personally don't like polluting the window namespace with unnecessary stuff. Especially since jQuery is so easy to extend. JQuery also provides methods of encapsulating data or objects (eg. $ (this).data(currentX, 125) that almost eliminates the need for multiple global variables. If any variable need to be available globally I usually either use an element as a data container, or store the data in the window in jQuerys context. (eg. $(window).data(currentwhatever, current data or obj). Often it is just easy to just create functions and variables in the global (window) scope and be off running with them. But if you are working directly with jQuery objects with your functions sometimes you are better off at least using anonymous functions that encapsulate the methods needed. If a method or variable does not have to be in a global context it should not be there. Personally I create most of my common functions within an anonymous function, and I extend jQuery and jQuery.fn anytime I am working with any method that has to be used by jQuery in any complex way. eg: (function ($) { // anon function var toupper = function(a){ anon function only available within this context return a.toUpperCase() }; $(#something).click(function(){ $(this).attr(title, toupper( $(this).attr(title) ) ); }); })(jQuery); I also don't like polluting jQuerys namespace unneccisarily. If there are several methods that are all doing parts of the same common objective I try to create 1 namespace in jQuery and use sub.methods within the $.extension. This way I am only using 1 namespace within jQuery and I can call my methods like this. $.mymethod.foo(); $.mymethod.bar(); $.extend({ mymethod:{ foo: function(){ }, bar: function(){ }, foobar: function(){ } } }); I am sure people have different ways of doing this stuff but that is my 2 pence. On May 25, 3:50 pm, kiusau kiu...@mac.com wrote: QUESTION: I once read in this forum that it is a good idea to limit the number of new jQuery methods and write as much script as possible outside of the jQuery framework. If this is true, then how does one go about assigning functions to tags, if they are not themselves jQuery methods that one creates. BACKGROUND: In my eagerness to get up to speed quickly I began turning every function into a jQuery method. This may be contributing to some of my difficulty. Roddy
[jQuery] Re: Superfish with multicolumn sub navigation
Hi, Hmm...I had worked with CMS 'Silverstripe' in that we do get varaibles 'current' for current page 'link' for other pages. We do get all pages name from parent table.So I do retrive menu names based on pages from particular field names.Displaying with if exp 'Current' then 'Link'. In silverstripe I used to do the same please check in joomla whether they have same or not On Tue, May 26, 2009 at 1:16 PM, Hetneo charles.kingsley.no...@gmail.comwrote: Hi Mohammad, You're exactly right. That's is the functionality of the superfish extension for Joomla. I found this tutorial very helpful: http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-with-jquery/ In this case however, superfish ( http://users.tpg.com.au/j_birch/plugins/superfish/ ) is far advanced than that tutorial and I am looking to extend the functionality of the tutorial into superfish. Say for example you have three levels of menu menu-level-1, menu- level-2, menu-level-3. When you hover over menu-level-1, I want superfish to display both menu-level-2 and menu-level-3 levels for all menu items on levels two and three. I had hoped someone had achived this to save me some time :). Any ideas? Many thanks, Charles On May 26, 5:16 pm, Mohd.Tareq tareq.m...@gmail.com wrote: Hi Hetneo, Its easy to get that kind of menu using javascript / jquery code. See they have written plugin based on ul li. Now here is a solution like Ischa I guess ;) Step : 1 - Create Main menu div menu1,menu2,menu3,etc 2 - Create another menu below each menu div [menu1 - sub-menu1] 3 - Use 'hover' function of jquery or 'onmouseover / onmouseout' of javascript 3 - Within 'hover' or 'onmouseover/onmouseout' function you need to hide / unhide your divs 4 - Use any function like fadeIn,fadeOut,slideUp,slideUp to toggle your menu. Or you can do it via css like twitter people did. cheers, On Tue, May 26, 2009 at 12:15 PM, Ischa Gast cont...@ischagast.nl wrote: That's great news. Would be interested to see the final product. Are there any hints you can give me or point me to a file I can be focusing my attention to achive this? It's a custom made script where you can choose what child you want to target, something superfish doesn't have but would be very welcome. ---| Regard |--- Mohammad.Tareque -- ---| Regard |--- Mohd.Tareque
[jQuery] Re: hoverIntent conflicts in IE browsers ( superfish fly-out )
More finding on this issue. Turns out it may not be the issue with jQuey v1.3.2 but the hoverIntent script. With hoverIntent, using v1.3.2 the flyout is gone. Using hoverIntent with v1.2.6 the flyout shows however further testing shows that, once a flyout menu has been viewed (without clicking on anything), it won't show up again unless I refresh the page, this is happening in IE6, IE7 and IE8. I removed the hoverIntent for further testing, the problem gone in all IE browsers. I then changed back to v1.3.2, everything seems to be working now. On May 25, 12:27 am, sutra chinesedr...@gmail.com wrote: I hope this post is appropriate, because this is the only way I could contact the author who wrote the script. quote: If you need help with the jQuery/JavaScript aspect of the plugin, post a message to the General jQuery Google Group with the word “Superfish” Thanks.
[jQuery] Re: Superfish with multicolumn sub navigation
simple recipe for multi column subs with superfish put div into 2nd level li. Put whatever you want inside this div, images, multiple divs, heading tags etc. Style divs any way you need use supersubs.js to adjust widths if not all sub menu's are same width Hetneo wrote: Hi Mohammad, You're exactly right. That's is the functionality of the superfish extension for Joomla. I found this tutorial very helpful: http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-with-jquery/ In this case however, superfish ( http://users.tpg.com.au/j_birch/plugins/superfish/ ) is far advanced than that tutorial and I am looking to extend the functionality of the tutorial into superfish. Say for example you have three levels of menu menu-level-1, menu- level-2, menu-level-3. When you hover over menu-level-1, I want superfish to display both menu-level-2 and menu-level-3 levels for all menu items on levels two and three. I had hoped someone had achived this to save me some time :). Any ideas? Many thanks, Charles On May 26, 5:16pm, "Mohd.Tareq" tareq.m...@gmail.com wrote: Hi Hetneo, Its easy to get that kind of menu using _javascript_ / jquery code. See they have written plugin based on ul li. Now here is a solution like Ischa I guess ;) Step : 1 - Create Main menu div menu1,menu2,menu3,etc 2 - Create another menu below each menu div [menu1 - sub-menu1] 3 - Use 'hover' function of jquery or 'onmouseover / onmouseout' of _javascript_ 3 - Within 'hover' or 'onmouseover/onmouseout' function you need to hide / unhide your divs 4 - Use any function like fadeIn,fadeOut,slideUp,slideUp to toggle your menu. Or you can do it via css like twitter people did. cheers, On Tue, May 26, 2009 at 12:15 PM, Ischa Gast cont...@ischagast.nl wrote: That's great news. Would be interested to see the final product. Are there any hints you can give me or point me to a file I can be focusing my attention to achive this? It's a custom made script where you can choose what child you want to target, something superfish doesn't have but would be very welcome. ---| Regard |--- Mohammad.Tareque
[jQuery] Can the click() function be used in an if statement
Hello, I would like to know whether a jquery click function can be used in an if statement. The reason why I am asking, is because I haven't seen any examples of this being done on the web. I want to use this approach because currently Jquery keeps initiating two events from one mouse click, eventhough the css for each element is different. I think the best way to avoid this problem is to use flow control to exclude the other mouse click event. If element A is clicked then skip B Regards Martin Ikediashi
[jQuery] Re: set the gap of start and end date in datepicker
hi here is how i do to set start date cannot be after end date $(#startId, #endId).datepicker({ beforeShow : function(input) { return { 'minDate' : (input.id == 'endId' ? $('#startId').datepicker('getDate') : null), 'maxDate' : (input.id == 'startId' ? $('#endId').datepicker('getDate') : null) }; } }) basically you have to modify the date after you get the date from datepicker hope it help you get started
[jQuery] jQuery Ajax breaking in IE..... please help!!
I am developing a VoIP Customer Portal with jQuery/Ajax. Everything works fine in Firefox, but in IE and Safari, the JS breaks. I used MS Script Debugger to get a backtrace, and i find that the breakpoint is at a jQuery Ajax call: var AJAXURL = 'app/ajax.php'; $.ajax({ url:AJAXURL+auth-login, type:POST, data:user=+uname+pass=+pass, dataType:json, success:function( json ) { // code removed } }); Why oh why is this happening?? Any help would be greatly appeciated.
[jQuery] Where to find a proper slide effect?
I've searched the archives, and lot of people asked this question, but there were no answers, just links to UI docs or that shouldn't be too hard using some css and animation.. Anyway, I've made a demo of what I (we :) want: http://sklupc.com/slide/ The question: where to find or how to make jQuery slide effect (left) to work like scriptaculous slide effect (right) Notice that scriptaculous slide pushes the content below smoothly but jQuery slide first moves it and then slide in. jQuery Blind, on the other hand, pushes it smoothly but it's not the same effect. Anyone?
[jQuery] [tooltip] Passing the mouseover event to the bodyhandler
Hi, I made a small adjustment to the jQuery Tooltip plugin from bassistance. The mouseover event is now passed to the bodyhandler, this makes it easy to use event delegation of bubbling. You an for example attach a tooltip to a TR instead of adding it to all TDs in the TR. The old way: $('#mytable tr.myclass td').tooltip({ bodyHandler: function() { var id = $(this).attr(id); return CreateTooltip(id); }, track: true }); The new way: $('#mytable tr.myclass').tooltip({ bodyHandler: function(e) { var id = $(e.target).attr(id); return CreateTooltip(id); }, track: true }); Maybe Jörn Zaefferer can add this to a next release of the tooltip. Regards, Jochen The code: /* * jQuery Tooltip plugin 1.3 * * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ * http://docs.jquery.com/Plugins/Tooltip * * Copyright (c) 2006 - 2008 Jörn Zaefferer * * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $ * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Changes by Jochen Jonckheere (c) 2009 * - Passing the mouseover event to the bodyhandler */ ; (function($) { // the tooltip element var helper = {}, // the current tooltipped element current, // the title of the current element, used for restoring title, // timeout id for delayed tooltips tID, // IE 5.5 or 6 IE = $.browser.msie /MSIE\s(5\.5|6\.)/.test(navigator.userAgent), // flag for mouse tracking track = false; $.tooltip = { blocked: false, defaults: { delay: 200, fade: false, showURL: true, extraClass: , top: 15, left: 15, id: tooltip }, block: function() { $.tooltip.blocked = !$.tooltip.blocked; } }; $.fn.extend({ tooltip: function(settings) { settings = $.extend({}, $.tooltip.defaults, settings); createHelper(settings); return this.each(function() { $.data(this, tooltip, settings); this.tOpacity = helper.parent.css(opacity); // copy tooltip into its own expando and remove the title this.tooltipText = this.title; $(this).removeAttr(title); // also remove alt attribute to prevent default tooltip in IE this.alt = ; }) .mouseover(save) .mouseout(hide) .click(hide); }, fixPNG: IE ? function() { return this.each(function() { var image = $(this).css('backgroundImage'); if (image.match(/^url\([']?(.*\.png)[']?\)$/i)) { image = RegExp.$1; $(this).css({ 'backgroundImage': 'none', 'filter': progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src=' + image + ') }).each(function() { var position = $(this).css('position'); if (position != 'absolute' position != 'relative') $(this).css('position', 'relative'); }); } }); } : function() { return this; }, unfixPNG: IE ? function() { return this.each(function() { $(this).css({ 'filter': '', backgroundImage: '' }); }); } : function() { return this; }, hideWhenEmpty: function() { return this.each(function() { $(this)[$(this).html() ? show : hide](); }); }, url: function() { return this.attr('href') || this.attr('src'); } }); function createHelper(settings) { // there can be only one tooltip helper if (helper.parent) return; // create the helper, h3 for title, div for url helper.parent = $('div id=' + settings.id + 'h3/h3div class=body/divdiv class=url/div/div') // add to document .appendTo(document.body) // hide it at first .hide(); // apply bgiframe if available if ($.fn.bgiframe) helper.parent.bgiframe(); // save references to title and url elements helper.title = $('h3', helper.parent); helper.body = $('div.body', helper.parent); helper.url = $('div.url', helper.parent); } function settings(element) { return $.data(element, tooltip); } // main event handler to start showing
[jQuery] input field name include . jquery cann't parse
when i use jquery get a input like input type=text id=user.name name=user.name/ use $(#user.name) is error if input is input type=text id=username name=username/ use $(#username) is right is bug?
[jQuery] Re: Can the click() function be used in an if statement
how do you click A and invoke B's onclick?the only way is A is B's child. as far as i can think and if thats the case you have event bubbling you can stop this by calling event.stopPropagation()
[jQuery] Re: Can the click() function be used in an if statement
Yes, basically I have #accountButtons div.question and #accountButtons div.question b The second element is an X over the background image on the first element. I want either element to be exclusively selected when clicked, but when I use the following code, both elements are hit when you click on the X (#accountButtons div.question b) ... $(#accountButtons div.question).click(function(){ Do A }); $(#accountButtons div.question b).click(function(){ Do B }); Regards Martin Ikediashi On May 26, 12:08 pm, Steven Yang kenshin...@gmail.com wrote: how do you click A and invoke B's onclick?the only way is A is B's child. as far as i can think and if thats the case you have event bubbling you can stop this by calling event.stopPropagation()
[jQuery] Select box// onchange in niceform doesn't work !!
Hi Guys , I am using the niceforms.js to change the look of the fields. but came to know that the onchange event for select boxes in such a form doesn't work, as the niceforms.js replaces the select box with divs Any one have any solution, how to implement the onchange event in such a situation, or any work around. Any kind of help is appreciable , thanks -- Regards, Amit Kr. Sharma Profile: http://www.linkedin.com/in/amit2sharma
[jQuery] Re: input field name include . jquery cann't parse
'# ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (-), underscores (_), colons (:), and periods (.).' http://www.w3.org/TR/html401/types.html#type-name So it would seem to be a bug. On May 26, 4:09 am, weit...@263.net weit...@263.net wrote: when i use jquery get a input like input type=text id=user.name name=user.name/ use $(#user.name) is error if input is input type=text id=username name=username/ use $(#username) is right is bug?
[jQuery] Re: jQuery Ajax breaking in IE..... please help!!
$.post(login.php,{user:uname,pass:pass},function(data){ alert(data.something); },json); Is easier, otherwise you can try removing the word json and using another name and see if that works. Good luck on your mission of success! -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of yrelkin Sent: Tuesday, May 26, 2009 1:15 AM To: jQuery (English) Subject: [jQuery] jQuery Ajax breaking in IE. please help!! I am developing a VoIP Customer Portal with jQuery/Ajax. Everything works fine in Firefox, but in IE and Safari, the JS breaks. I used MS Script Debugger to get a backtrace, and i find that the breakpoint is at a jQuery Ajax call: var AJAXURL = 'app/ajax.php'; $.ajax({ url:AJAXURL+auth-login, type:POST, data:user=+uname+pass=+pass, dataType:json, success:function( json ) { // code removed } }); Why oh why is this happening?? Any help would be greatly appeciated.
[jQuery] Re: jQuery Timers Loop
another couple notes: It is a good idea for jQuery to use the an #ID for the call $(#myol) instead of $(OL). Also.. If someone adds another OL somewhere on the page, the methods you are applying will be applied to every other OL on the page. Which may not do what you intended. Using OL will cause jQuery to look over every element in the page looking for OL elements. Using the #ID maps to the window documentGetElementById() which is much faster than DOM transversal. Its not too big of a deal since your page is pretty lightweight, but it is good practice to use #ID. Also, using DIV before the ID $(DIV#arrow) is not really necessary. Since jQuery 1.3 the selector engine works from the bottom up,(I hope I am saying that right)-- so adding the DIV is just extra code. Hope that helps! On May 26, 4:17 am, Pepperman chorno...@gmail.com wrote: Try this. It is using jQuerys offset() method to get the current elements position. This way you do not have to create a class for each position you need to to be in. Let JQuery figure that part out. You will probably have to tweak the css offset a bit to get it to sit exactly where you want over the ul. eg. top: offset.top - 15, left: offset.left - 25 script type=text/javascript $(#myol).everyTime(4000, myrotate, function() { var $this = $(this), $thisli = $this.find(li), offset; $this.data(currentshow, $this.data(currentshow) || 0); offset = $thisli.removeClass(on).eq($this.data(currentshow)) .addClass(on) .offset(); $(#arrow) .css({ top: offset.top - 15, left: offset.left - 25 }) .show(); $this.data(currentshow, $this.data(currentshow) === $thisli.length ? 0 : $this.data(currentshow) + 1);}); /script On May 26, 12:21 am, MauiMan2 cmzieba...@gmail.com wrote: Hmm, I think that might work. Now just have to tinker w/ it a bit to get the arrow to animate as well. Thanks, Pepperman! On May 25, 7:57 pm, Pepperman chorno...@gmail.com wrote: I had to do something like this recently. Try this: ol id=myol liWe establish, through the Secretary of State, a Corporation in any state you choose as your home base of operations./li liWe customize a 401k plan that can invest in your corporate stock and traditional investments./li liOur experts help you roll over your retirement funds into the 401k plan that you control./li liThe 401k makes a direct purchase of your corporate stock, infusing your corporation with cash./li liWe help you set up a Corporate Bank Account with checkbook control of your corporate funds./li /ol script type=text/javascript $(#myol).everyTime(4000, myrotate, function() { var $this = $(this), hlen = $this.find(li).length; $this.data(currentshow, $this.data(currentshow) || 0); $this.find(li).removeClass(on) .eq($this.data(currentshow)) .addClass(on); $this.data(currentshow, $this.data(currentshow) === hlen ? 0 : $this.data(currentshow) + 1);}); /script On May 25, 5:28 pm, MauiMan2 cmzieba...@gmail.com wrote: I've used the jQuery Timers plugin (http://plugins.jquery.com/project/ timers) to animate through my client's five steps on this page:http://www.cmzmedia.com/irarollover/butistherea way to get it to continuously loop through the animation? The documentation page (http://jquery.offput.ca/timers/) doesn't seem to cover anything like that. Thanks in advance.
[jQuery] 2 links = 1 action
Hi! currently I have this: $('.contenttitleh1a').click(function() { ... Is there a way to say $('.contenttitleh1a'). or $('.itema'). click(function() { .? It's just that I have 2 different links to click but behind the same action... Thanks!
[jQuery] Re: Where to find a proper slide effect?
look at demo on jQuery site, works exactly same as your sciptaculous example http://docs.jquery.com/Tutorials:Live_Examples_of_jQuery. not sure why your's causing issues, used this many times myself with same result M.M. wrote: I've searched the archives, and lot of people asked this question, but there were no answers, just links to UI docs or "that shouldn't be too hard using some css and animation..."... Anyway, I've made a demo of what I (we :) want: http://sklupc.com/slide/ The question: where to find or how to make jQuery slide effect (left) to work like scriptaculous slide effect (right) Notice that scriptaculous slide pushes the content below smoothly but jQuery slide first moves it and then slide in. jQuery Blind, on the other hand, pushes it smoothly but it's not the same effect. Anyone?
[jQuery] Newbie needs to update existing JQuery code
Hi. I'm developing a Google Map for a client and need some basic help... This is my client's existing website and you'll see that it contains a small Google Map embedded in an iframe: http://www.bellamallorca.dk/devindex.asp Give the Stort Kort link a click and some JQuery runs and opens a pop- up containing a larger map. This is the code that executes when the Stort Kort link is clicked: a href=# class=enlarge_icon onclick=$$('.hide_items').each (Element.hide);$$('.largemap').each(Element.show);frames ['largeMapIframe'].location.href='http://maps.google.com/maps/ms? ie=UTF8amp;msa=0amp;msid=108304117273229554382.0004601474e59e1753111amp;ll=39.649078,2.915154amp;spn=0.62372,1.047135amp;output=embed'; onMouseOver=$$('.largemap_infotext').each(Element.show); onMouseOut=$$('.largemap_infotext').each(Element.hide); style=cursor:pointer;Stort kort/a Now my map will replace both the small and large map on my client's website. My map is still under development but here is a link to the current version: http://googlemapsapi.martinpearman.co.uk/user_maps/bellamallorca.dk/20090526/ That's the large map, call the same map with a 'smallmap' parameter and you get a small version of the same map: http://googlemapsapi.martinpearman.co.uk/user_maps/bellamallorca.dk/20090526/?smallmap Each location plotted on either map has a unique index value, and calling the large map with an index parameter opens the large map with that location centered on and it's information window opened: http://googlemapsapi.martinpearman.co.uk/user_maps/bellamallorca.dk/20090526/?index=41 So on to my question. How can my small map launch the large map in the pop-up window and specify the index of a location to center on? An even simpler question - how can the Stort Kort link simply open the pop-up containing my large map? I tried taking the source code from my client's existing page and replacing the iframe src attributes with the URLs to my small and large map. The page loads and displays my small map but when i click Stort Kort the page redirects from my domain (where the under-development map is hosted) to my clients website: http://googlemapsapi.martinpearman.co.uk/user_maps/bellamallorca.dk/20090526/devindex.htm I've looked through the source code but really cannot make much sense of the JQuery stuff. Can anyone explain what my client's existing web page is doing and how i might change it to use my new map? Once my map is complete it shall be hosted on my clients website btw and not on my domain. Thanks a lot for any pointers. Martin.
[jQuery] Re: input field name include . jquery cann't parse
这个有人清楚么?我也比较好奇
[jQuery] Re: jQuery Ajax breaking in IE..... please help!!
the url is 'app/ajax.phpauth-login' U missed the ? 'app/ajax.php?auth-login' On Tue, May 26, 2009 at 3:14 AM, yrelkin yrelkin...@gmail.com wrote: I am developing a VoIP Customer Portal with jQuery/Ajax. Everything works fine in Firefox, but in IE and Safari, the JS breaks. I used MS Script Debugger to get a backtrace, and i find that the breakpoint is at a jQuery Ajax call: var AJAXURL = 'app/ajax.php'; $.ajax({ url:AJAXURL+auth-login, type:POST, data:user=+uname+pass=+pass, dataType:json, success:function( json ) { // code removed } }); Why oh why is this happening?? Any help would be greatly appeciated. -- Gustavo Salome Silva
[jQuery] Re: input field name include . jquery cann't parse
No, it's not a bug, your selector is looking for an item of class name... so it's your selector that is the issue, not jQuery (your naming/id convention would also cause issues with CSS)... If you insist on poor choices for naming your controls, it is still possible to select the items though http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F On May 26, 4:09 am, weit...@263.net weit...@263.net wrote: when i use jquery get a input like input type=text id=user.name name=user.name/ use $(#user.name) is error if input is input type=text id=username name=username/ use $(#username) is right is bug?
[jQuery] Re: 2 links = 1 action
$('.contenttitleh1a, .itema'). click(.) On May 26, 8:06 am, heohni heidi.anselstet...@consultingteam.de wrote: Hi! currently I have this: $('.contenttitleh1a').click(function() { ... Is there a way to say $('.contenttitleh1a'). or $('.itema'). click(function() { .? It's just that I have 2 different links to click but behind the same action... Thanks!
[jQuery] Validate selectedValue in a combobox
Hi all, I have a simple combobox like this: form id=myForm action= method=post select id=city option value=Select a city/option option value=1Milan/option option value=2Turin/option option value=3Rome/option option value=4Venice/option /select /form and a validation rule like this: $('form#myForm').validate({ rules: { city: { required: true } }, messages: { city: { required: span style='color:#ff;'Please, select a city/span } } }); The problem is that doesn't work! Where I've wrong? Thanks a lot. Luis
[jQuery] Re: 2 links = 1 action
$('.contenttitleh1a, .itema').click(function() { ... heohni wrote: Hi! currently I have this: $('.contenttitleh1a').click(function() { ... Is there a way to say $('.contenttitleh1a'). or $('.itema'). click(function() { .? It's just that I have 2 different links to click but behind the same action... Thanks!
[jQuery] Re: Validate selectedValue in a combobox
The validation plugin uses the name-attribute. Your select has just an id, no name. Add name=city and it should be working! Jörn On Tue, May 26, 2009 at 2:20 PM, ciupaz luigi.zambe...@gmail.com wrote: Hi all, I have a simple combobox like this: form id=myForm action= method=post select id=city option value=Select a city/option option value=1Milan/option option value=2Turin/option option value=3Rome/option option value=4Venice/option /select /form and a validation rule like this: $('form#myForm').validate({ rules: { city: { required: true } }, messages: { city: { required: span style='color:#ff;'Please, select a city/span } } }); The problem is that doesn't work! Where I've wrong? Thanks a lot. Luis
[jQuery] Re: jQuery, the Ready Function, and Other Javascript - A Dirt Simple Inquiry
According to the documentation, the body of your ready function will execute when the DOM has loaded and is ready to traverse. The last two scripts manipulate the DOM, so I would put the ready function afterward so I could be more confident in the results. This is a good area for experimentation. Try creating a simple function that toggles, say, a text style. Call your toggle function from inside a ready function and also put a copy in a script src ... / file, then move them around, changing the order of the script src ... / and the $(document).ready(). You might be able to learn something by doing that which you could share with us and get a deeper understanding of execution order with jQuery. On May 26, 3:22 am, kiusau kiu...@mac.com wrote: QUESTION: What is the general rule for using the Ready function in the presence of other Javascript? BACKGROUND: I have recently discovered that my previous problems with the customization of the jQ Impromptu plug-in could be overcome through isolation. In effect, I removed my script from the targeted document, eliminated all of my self-created jQuery methods with the exception of one, and tried the package in a different, separate document. Everything functioned as intended. With renewed confidence I am now ready to return the package to the originally targeted document. This is where you may be able to help. Please examine the script below and note that I am using the Ready function in combination with other script tags. I have organized the script tags according to use or non-use with the Ready function. Everything before the Ready function is called either directly or indirectly by the Ready function. Everything after it is not. Do you see a possible source of error? link href=../SpryAssets/SpryAccordion.css rel=stylesheet type=text/css / link href=../SpryAssets/SpryMenuBarHorizontal.css rel=stylesheet type=text/css / link href=../CSS/imagine.css rel=stylesheet type=text/css / link href=../CSS/jQ_Impromptu.css rel=stylesheet type=text/css / script src=../JavaScript/jQuery-1.3.2-vsdoc2.js type=text/ javascript/script script src=../JavaScript/errorMessages.js type=text/javascript/ script script src=../JavaScript/popUpBoxConfiguration.js type=text/ javascript/script script src=../JavaScript/jQ_browserIdentification.js type=text/ javascript/script script src=../JavaScript/jQ_Impromptu-2.5.js type=text/ javascript/script script src=../JavaScript/jQ_Imagine.js type=text/javascript/ script script src=../JavaScript/SVG_roundies_0.0.2a.js type=text/ javascript/script script type=text/javascript $(document).ready(function() { $('#today').toDate(); $('#clock').JSClock(); $('#duration').timePassed(); $('body').SVG_RoundiesIntializer(); $().getBrowserInformation(); }); /script script src=../SpryAssets/SpryAccordion.js type=text/javascript/ script script src=../SpryAssets/SpryMenuBar.js type=text/javascript/ script Roddy
[jQuery] Re: Can the click() function be used in an if statement
Got it working thanks yang.. Merely did.. $(#accountButtons div.question b).click(function(e){ Do B e.stopPropagation(); }); That fixed the problem so event A isnt fired... On May 26, 12:08 pm, Steven Yang kenshin...@gmail.com wrote: how do you click A and invoke B's onclick?the only way is A is B's child. as far as i can think and if thats the case you have event bubbling you can stop this by calling event.stopPropagation()
[jQuery] Re: Validate selectedValue in a combobox
Thank you Jorn, now with the name attribute it's working. A simple question. For business rules I have to give the value -1 to the Select the city option. Like this: select id=city name=city option value=-1Select a city/option option value=1Milan/option option value=2Turin/option option value=3Rome/option option value=4Venice/option /select How can I validate in this case? Luis
[jQuery] Re: Validate selectedValue in a combobox
You'd have to write a custom method for that. Or replace the value on submit or something like that. The required-rule works with an empty value. Jörn On Tue, May 26, 2009 at 3:22 PM, ciupaz luigi.zambe...@gmail.com wrote: Thank you Jorn, now with the name attribute it's working. A simple question. For business rules I have to give the value -1 to the Select the city option. Like this: select id=city name=city option value=-1Select a city/option option value=1Milan/option option value=2Turin/option option value=3Rome/option option value=4Venice/option /select How can I validate in this case? Luis
[jQuery] Re: jQuery Validation Plugin
Man i combed the docs for a day, and i missed that link everytime.. Thanks Jorn. On May 23, 3:02 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You need to quote the full key, eg name['name']: required. Seehttp://docs.jquery.com/Plugins/Validation#Fields_with_complex_names_ Jörn On Fri, May 22, 2009 at 10:15 PM, Bob O bhan...@hcinsight.com wrote: so as not to confuse.. the name attribute looks like this name=name['name'] for the input field and the js is rules: { name['name']: 'required' } i noticed typos in the above question. On May 22, 12:36 pm, bhan...@hcinsight.com bhan...@hcinsight.com wrote: Can anyone tell me how i can change which attribute on my form field triggers the validation? currently it appears the be the name attribute. So in my Rails app using Rails helpers, it sets the name to somthing like formname ['fieldname'] and the whole name. in my script if i do something like rules: { formname['fieldname]: 'required' } etcit causes the script to break. I need a workaround if anyone has ever come across this problem.. Thanks in Advance
[jQuery] Textarea value with javascript
Good day How can I get current textarea that was changed in fckEditor value with javascript. I got: textarea name=comment id=commentHello/textarea Then happens this: $('textarea').fck({ path:'/fckeditor/' }); , so now I get fckEditor insted my textarea. Then I change the original text in fckeditor to Hello world. When I press the button with javascript like this: function myfunc(formid) { gotForm = document.getElementById(formid); newContent = gotForm.elements.comment.value; } Variable 'newContent' still has value only Hello, NOT new value Hello world. So the question - how can I get new value of fckEditor with my javascript? Best regards
[jQuery] Re: Validate selectedValue in a combobox
Custom methods are documented here: http://docs.jquery.com/Plugins/Validation/Validator/addMethod Jörn On Tue, May 26, 2009 at 3:49 PM, ciupaz luigi.zambe...@gmail.com wrote: Yes, exactly, and I'm trying this custom method: function GetCityValue() { var value = $('#city').val(); if (value == -1) { return true; } else { return false; } } and .. city: { required: GetCityValue() }, but does not working. Do you have ideas? Luis
[jQuery] Re: Textarea value with javascript
You tried the innerHTML? On Tue, May 26, 2009 at 10:21 AM, saa...@gmail.com saa...@gmail.com wrote: Good day How can I get current textarea that was changed in fckEditor value with javascript. I got: textarea name=comment id=commentHello/textarea Then happens this: $('textarea').fck({ path:'/fckeditor/' }); , so now I get fckEditor insted my textarea. Then I change the original text in fckeditor to Hello world. When I press the button with javascript like this: function myfunc(formid) { gotForm = document.getElementById(formid); newContent = gotForm.elements.comment.value; } Variable 'newContent' still has value only Hello, NOT new value Hello world. So the question - how can I get new value of fckEditor with my javascript? Best regards
[jQuery] Re: Textarea value with javascript
Yeah On 26 maijs, 16:53, Caires Vinicius caire...@gmail.com wrote: You tried the innerHTML? On Tue, May 26, 2009 at 10:21 AM, saa...@gmail.com saa...@gmail.com wrote: Good day How can I get current textarea that was changed in fckEditor value with javascript. I got: textarea name=comment id=commentHello/textarea Then happens this: $('textarea').fck({ path:'/fckeditor/' }); , so now I get fckEditor insted my textarea. Then I change the original text in fckeditor to Hello world. When I press the button with javascript like this: function myfunc(formid) { gotForm = document.getElementById(formid); newContent = gotForm.elements.comment.value; } Variable 'newContent' still has value only Hello, NOT new value Hello world. So the question - how can I get new value of fckEditor with my javascript? Best regards- Paslēpt citēto tekstu - - Rādīt citēto tekstu -
[jQuery] Re: Validate selectedValue in a combobox
I must write it in the jquery.validate.js file?
[jQuery] Re: Validate selectedValue in a combobox
Yes, exactly, and I'm trying this custom method: function GetCityValue() { var value = $('#city').val(); if (value == -1) { return true; } else { return false; } } and .. city: { required: GetCityValue() }, but does not working. Do you have ideas? Luis
[jQuery] Re: Validate selectedValue in a combobox
Nope, just add the code in some file, included after jquery.validate.js. Jörn On Tue, May 26, 2009 at 4:03 PM, ciupaz luigi.zambe...@gmail.com wrote: I must write it in the jquery.validate.js file?
[jQuery] [Chrome, Safari 3] Problem with Tabs plug-in loaded dynamically
Hi, I've got following problem with UI plugin loaded dynamically on page. Whole application works fine on FF, Opera and IE. Unfortunately problem occurs in Chrome and Safari. I've got some master page with menu, and I'm loading new pages on click event using following code: $('#menuwelcome').click(function() { $.post(welcome.aspx, function(data) { $(#load).hide (); $(#load).html(data).fadeIn(slow); }); }); Page is loaded into div on master page. In this loaded page, I've got code which is creating tabs from list items. In IE, FF and Opera, page is loaded and after that UI Tabs are creating tabs. In Chrome and Safari page content is just loaded, but nothing else happen. It's only showing list of items and that's all. Code which is creating tabs: $(document).ready(function() { $(#welcome).tabs(); }); div id=welcome ul lia href=Profil/welcome.aspxWillkommen/a/li lia href=Profil/profil.aspxUnser Profil/a/ li /ul /div Any ideas why it's not working in these 2 browsers?
[jQuery] Re: Validate selectedValue in a combobox
I have created the file jquery.validateCopy.js and added with: script src=jquery-1.3.2.js type=text/javascript/script script src=jquery.validate.js type=text/javascript/script script src=jquery.validateCopia.js type=text/javascript/script in my HEAD section. Than I write: jQuery.validator.addMethod(GetValue, function() { return true; }, jQuery.format(Please enter the correct value)); in it. Then I modify it with: city: { required: GetValue() }, but does not compile. What's wrong? Luis
[jQuery] [nyroModal] problems getting ajax-loaded content to trigger nyroModal window
I posted this on the nyroModal group as well, but thought I'd throw it out to the JQ group. Im decent with JQ on static content, but am an ajax newbie. http://70.32.84.175/events/ At the preceding link, on initial page load, the events loaded beneath the slider interface, 'view details' links trigger nyroModal fine, but upon slider interaction (new results loaded via ajax) 'view details' links are still class=nyroModal but do not open in the nyroModal window. I have inserted the $('a.nyroModal').nyroModal(); initiation on the search page, ajax page, and in the post call to the ajax page to no avail. Any thoughts? Thanks! -Adam
[jQuery] Re: jQuery Validation Plugin
A testpage would help. Can't see anything wrong with that code. Jörn On Tue, May 26, 2009 at 4:13 PM, Bob O bhan...@hcinsight.com wrote: So it seems im still having some issues.. this is my html form id=new_blog_post class=new_blog_post method=post action=/ blog_posts p label for=blog_post_titleTitle/label br/ input id=blog_post_title type=text size=30 name=blog_post [title]/ /p p label for=blog_post_bodyBody/label br/ textarea id=blog_post_body rows=5 name=blog_post[body] cols=28/ /p p label for=blog_post_authorAuthor/label br/ input id=blog_post_author type=text size=30 name=blog_post [author]/ /p p label for=blog_post_permalinkPermalink/label span class=small_textA hyphen separated title for URL's e.g. my- title/span br/ input id=blog_post_permalink type=text size=30 name=blog_post [permalink]/ /p p input id=blog_post_submit class=btn type=submit value=Submit name=commit/ /p /form and this is my js placed after the jQuery and jquery.validate scripts. $(document).ready(function() { $('#new_blog_post').validate({ rules: { blog_post[title]: required, blog_post[body]: required, blog_post[author]: required }, messages: { blog_post[title]: You must enter a title., blog_post[body]: You cant have a blog without a blog..?, blog_post[author]: You must supplay an author name } }); }); Any ideas? On May 26, 7:48 am, Bob O bhan...@hcinsight.com wrote: Man i combed the docs for a day, and i missed that link everytime.. Thanks Jorn. On May 23, 3:02 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You need to quote the full key, eg name['name']: required. Seehttp://docs.jquery.com/Plugins/Validation#Fields_with_complex_names_ Jörn On Fri, May 22, 2009 at 10:15 PM, Bob O bhan...@hcinsight.com wrote: so as not to confuse.. the name attribute looks like this name=name['name'] for the input field and the js is rules: { name['name']: 'required' } i noticed typos in the above question. On May 22, 12:36 pm, bhan...@hcinsight.com bhan...@hcinsight.com wrote: Can anyone tell me how i can change which attribute on my form field triggers the validation? currently it appears the be the name attribute. So in my Rails app using Rails helpers, it sets the name to somthing like formname ['fieldname'] and the whole name. in my script if i do something like rules: { formname['fieldname]: 'required' } etcit causes the script to break. I need a workaround if anyone has ever come across this problem.. Thanks in Advance
[jQuery] Re: hoverIntent conflicts in IE browsers ( superfish fly-out )
Can you send me a sample of the code that breaks? Thanks, Brian. On Tue, May 26, 2009 at 2:48 AM, sutra chinesedr...@gmail.com wrote: More finding on this issue. Turns out it may not be the issue with jQuey v1.3.2 but the hoverIntent script. With hoverIntent, using v1.3.2 the flyout is gone. Using hoverIntent with v1.2.6 the flyout shows however further testing shows that, once a flyout menu has been viewed (without clicking on anything), it won't show up again unless I refresh the page, this is happening in IE6, IE7 and IE8. I removed the hoverIntent for further testing, the problem gone in all IE browsers. I then changed back to v1.3.2, everything seems to be working now. On May 25, 12:27 am, sutra chinesedr...@gmail.com wrote: I hope this post is appropriate, because this is the only way I could contact the author who wrote the script. quote: If you need help with the jQuery/JavaScript aspect of the plugin, post a message to the General jQuery Google Group with the word “Superfish” Thanks.
[jQuery] Re: Newbie needs to update existing JQuery code
I'm working on a Google Map app using jQuery and Google maps code together but I got very confused trying to follow your questions. you can pass variables ( index, lat/long or whatever works easiest) from small map to the URL that opens big map. invesitgate jQuery .attr() to do this, work with that to modify href in big map use the variables passed to create a new GLatLng to center map, open infowindow or whatever here are a couple of good resources that might also help : Google "jQuery Google Maps tutorial" and also a jQuery Google Maps plugin called jmaps Martin wrote: Hi. I'm developing a Google Map for a client and need some basic help... This is my client's existing website and you'll see that it contains a small Google Map embedded in an iframe: http://www.bellamallorca.dk/devindex.asp Give the Stort Kort link a click and some JQuery runs and opens a pop- up containing a larger map. This is the code that executes when the Stort Kort link is clicked: a href="" class="enlarge_icon" moz-txt-link-freetext" href="">http://maps.google.com/maps/ms? ie=UTF8amp;msa=0amp;msid=108304117273229554382.0004601474e59e1753111amp;ll=39.649078,2.915154amp;spn=0.62372,1.047135amp;output=embed';" style="cursor:pointer;"Stort kort/a Now my map will replace both the small and large map on my client's website. My map is still under development but here is a link to the current version: http://googlemapsapi.martinpearman.co.uk/user_maps/bellamallorca.dk/20090526/ That's the large map, call the same map with a 'smallmap' parameter and you get a small version of the same map: http://googlemapsapi.martinpearman.co.uk/user_maps/bellamallorca.dk/20090526/?smallmap Each location plotted on either map has a unique index value, and calling the large map with an index parameter opens the large map with that location centered on and it's information window opened: http://googlemapsapi.martinpearman.co.uk/user_maps/bellamallorca.dk/20090526/?index=41 So on to my question. How can my small map launch the large map in the pop-up window and specify the index of a location to center on? An even simpler question - how can the Stort Kort link simply open the pop-up containing my large map? I tried taking the source code from my client's existing page and replacing the iframe src attributes with the URLs to my small and large map. The page loads and displays my small map but when i click Stort Kort the page redirects from my domain (where the under-development map is hosted) to my clients website: http://googlemapsapi.martinpearman.co.uk/user_maps/bellamallorca.dk/20090526/devindex.htm I've looked through the source code but really cannot make much sense of the JQuery stuff. Can anyone explain what my client's existing web page is doing and how i might change it to use my new map? Once my map is complete it shall be hosted on my clients website btw and not on my domain. Thanks a lot for any pointers. Martin.
[jQuery] Re: Where to find a proper slide effect?
On May 26, 2:15 pm, Charlie charlie...@gmail.com wrote: look at demo on jQuery site, works exactly same as your sciptaculous examplehttp://docs.jquery.com/Tutorials:Live_Examples_of_jQuery. No, it doesn't, it looks exactly like my jQuery blind example on the left, and it's not what I need.
[jQuery] Re: Question about Tutorial: Find me: Using selectors and events
Thanks a bunch mkmanning, your brief answer had loads of meaning for me: a) we may look in the jQuery source file to see what a jQuery function does -- jQuery is after all simply JavaScript b) we can name any JavaScript object by using a colon after a name (http://www.codingforums.com/showthread.php?t=65948), which is how the hover function gets its name c) $ (dollar sign) has no particular meaning in JavaScript (question raised by looking at the beginning of the jQuery source file). Thus jQuery is free to give $_ a special meaning. Looking at the definition of the hover function then, the answer to my original question then appears to be, the hover function won't return until the mouseleave event is triggered. I still don't quite understand the details though. If you could indulge me with further explanation then my questions are: I can see that the hover function takes two parameters, a function to be called on mouseenter and a function to be called on mouseout. What's the difference between mouseenter and mouseover; and mouseleave and mouseout? Mouseover and mouseout are JavaScript event handlers, right? But mouseleave and mouseout appear to be more than aliases, looking at the jQuery source. Also I'm lost as to what the chain of mouseenter and mouseleave could mean: this.mouseenter(fnOver).mouseleave(fnOut); Thanks again, Carol
[jQuery] Re: jQuery Timers Loop
Thanks for the extra help, Pepperman. Yeah, I haven't perfectly polished off all the code yet. I hardly ever put anything like DIV#arrow but I guess an instance slipped through. I do try to not use IDs if an element name will do but am fine with using IDs when necessary.
[jQuery] Jquery Block plugin
Hi all. I was trying to use the Block plugin. I really need to show a modal popup on AjaxRequest and Stop it on Request End. How can I do that. I have seen etTimeout($.unblockUI, 6000), but I need to run server code,so I need to set this time out to the elapsed time in my server method. Thanks
[jQuery] Selecting previous sibling from an ordered list
Hello, I only started using jQuery recently and have hit a problem, I have an application that is rendering a list of applications which could have multiple releases within each application and multiple versions within each release. I have the following markup: ol id=selectable li class=app_nameApp1/li li class=app_releasespan class=bullet#8618;nbsp;/ spanR1/li li class=app_version oddspan class=bullet#8618;nbsp;/ span0.1/li li class=app_nameApp2/li li class=app_releasespan class=bullet#8618;nbsp;/ spanR1/li li class=app_version oddspan class=bullet#8618;nbsp;/ span0.1/li li class=app_nameApp3/li li class=app_releasespan class=bullet#8618;nbsp;/ spanR1/li li class=app_version oddspan class=bullet#8618;nbsp;/ span0.1/li li class=app_version evenspan class=bullet#8618;nbsp;/ span0.2/li li class=app_version oddspan class=bullet#8618;nbsp;/ span0.3/li li class=app_releasespan class=bullet#8618;nbsp;/ spanR2/li li class=app_version evenspan class=bullet#8618;nbsp;/ span0.1/li li class=app_version oddspan class=bullet#8618;nbsp;/ span0.2/li li class=app_version evenspan class=bullet#8618;nbsp;/ span0.3/li li class=app_version oddspan class=bullet#8618;nbsp;/ span0.4/li /ol When the user selects either a release or version I want to find the previous li entry text with the class app_name. So in the example above, if the user clicks the very last li row I want to get the Application text App3. I have taken the example code from the Selectable tutorial/ documentation and the following code works if I select the first li above with class app_version but not if I select the last one: $application = $(this).prev(.app_name).text(); I've read the Selectors page and searched these groups and tried several different ways of working but I'm struggling to make any progress. I do apologise in advance if this request is too basic! Many thanks - Robert Swift.
[jQuery] jCarousel Question
Hello. I have a question regarding jCarousel usage. I am able to configure jCarousel to display items on more than one horizontal line? For example: back 1 2 forward -- 3 4 - 4 items per section, 2 on each line. Thank you!
[jQuery] ajax/IE6 problem viewing data on page
Hi All, I'm new to this so please be patient. I'm using the following Jquery script: var counter = 0; function loaded(){ $.ajax({ url : status_, error : function (data) { counter++; if(counter == 3) { $(#Status).html(server disconnected); counter = 0; } }, success : function (data) { $(#Status).html(server connected); $(#placeHolder).html(data); } }); self.setTimeout('loaded()', 1); } Basically this script is being used as a work around for a problem we have encountered in Cherrypy (python web server). What we are trying to do is to show status_ page even if the server does not respond with the newest data we have (last one we got from the server before it stopped responding). When I use it with FF and IE7, it works just fine. When I use it with IE6, new data is not being shown on the status_ page. Can anyone help please? Thanks
[jQuery] Getting the child element on click
Simple stuff here but I'm new to jQuery from Prototype. My HTML is like this: div class=feature h2Heading Goes Here/h2 img src=photo.jpg / pText goes here/p /div // repeat x10 Javascript: (runs on page load) $('.feature h2').click(function () { $(this).parent().children(p).slideUp(400); }); What I want to happen is for the p element inside the .feature class to appear when the h2 of that div is clicked - make sense? I tried using next() and a few other methods but it doesn't work as neatly as I want it to - how can I tell jQuery to just return the p element within that div (and not all p elements which are inside a .feature class)? Thanks, Matt
[jQuery] Re: jQuery Validation Plugin
Hi Bob, Its working fine.. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleUntitled Page/title script type =text/javascript src=jquery-1.3.2-vsdoc2.js /script script type=text/javascript src=jquery-validator.js /script script type =text/javascript $(document).ready(function() { $('#new_blog_post').validate({ rules: { blog_post[title]: required, blog_post[body]: required, blog_post[author]: required }, messages: { blog_post[title]: You must enter a title., blog_post[body]: You cant have a blog without a blog..?, blog_post[author]: You must supplay an author name } }); }); /script /head body form id=new_blog_post class=new_blog_post method=post action=/blog_posts p label for=blog_post_titleTitle/label br/ input id=blog_post_title type=text size=30 name=blog_post[title]/ /p p label for=blog_post_bodyBody/label br/ textarea id=blog_post_body rows=5 name=blog_post[body] cols=28/textarea /p p label for=blog_post_authorAuthor/label br/ input id=blog_post_author type=text size=30 name=blog_post[author]/ /p p label for=blog_post_permalinkPermalink/label span class=small_textA hyphen separated title for URL's e.g. my-title/span br/ input id=blog_post_permalink type=text size=30 name=blog_post[permalink]/ /p p input id=blog_post_submit class=btn type=submit value=Submit name=commit/ /p /form /body /html 2009/5/26 Bob O bhan...@hcinsight.com So it seems im still having some issues.. this is my html form id=new_blog_post class=new_blog_post method=post action=/ blog_posts p label for=blog_post_titleTitle/label br/ input id=blog_post_title type=text size=30 name=blog_post [title]/ /p p label for=blog_post_bodyBody/label br/ textarea id=blog_post_body rows=5 name=blog_post[body] cols=28/ /p p label for=blog_post_authorAuthor/label br/ input id=blog_post_author type=text size=30 name=blog_post [author]/ /p p label for=blog_post_permalinkPermalink/label span class=small_textA hyphen separated title for URL's e.g. my- title/span br/ input id=blog_post_permalink type=text size=30 name=blog_post [permalink]/ /p p input id=blog_post_submit class=btn type=submit value=Submit name=commit/ /p /form and this is my js placed after the jQuery and jquery.validate scripts. $(document).ready(function() { $('#new_blog_post').validate({ rules: { blog_post[title]: required, blog_post[body]: required, blog_post[author]: required }, messages: { blog_post[title]: You must enter a title., blog_post[body]: You cant have a blog without a blog..?, blog_post[author]: You must supplay an author name } }); }); Any ideas? On May 26, 7:48 am, Bob O bhan...@hcinsight.com wrote: Man i combed the docs for a day, and i missed that link everytime.. Thanks Jorn. On May 23, 3:02 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You need to quote the full key, eg name['name']: required. Seehttp://docs.jquery.com/Plugins/Validation#Fields_with_complex_names_.. .. Jörn On Fri, May 22, 2009 at 10:15 PM, Bob O bhan...@hcinsight.com wrote: so as not to confuse.. the name attribute looks like this name=name['name'] for the input field and the js is rules: { name['name']: 'required' } i noticed typos in the above question. On May 22, 12:36 pm, bhan...@hcinsight.com bhan...@hcinsight.com wrote: Can anyone tell me how i can change which attribute on my form field triggers the validation? currently it appears the be the name attribute. So in my Rails app using Rails helpers, it sets the name to somthing like formname ['fieldname'] and the whole name. in my script if i do something like rules: { formname['fieldname]: 'required' } etcit causes the script to break. I need a workaround if anyone has ever come across this problem.. Thanks in Advance
[jQuery] Re: Where to find a proper slide effect?
they only have different easing value..otherwise they are identical. On May 26, 6:44 pm, M.M. mario.maru...@gmail.com wrote: On May 26, 2:15 pm, Charlie charlie...@gmail.com wrote: look at demo on jQuery site, works exactly same as your sciptaculous examplehttp://docs.jquery.com/Tutorials:Live_Examples_of_jQuery. No, it doesn't, it looks exactly like my jQuery blind example on the left, and it's not what I need.
[jQuery] Re: Where to find a proper slide effect?
On May 26, 8:32 pm, tain bugi@gmail.com wrote: they only have different easing value..otherwise they are identical. No they're not! Are we looking at the same page? The effect you get when you click Slide Out or Slide In on http://docs.jquery.com/Tutorials:Live_Examples_of_jQuery is NOT the slide effect I want. It's not even similar to scriptaculous effect in my example, because the text doesn't go with the slide, it just stays in place and gets revealed (it's normal jQuery 'slide' effect, in jQuery UI it's called 'blind') Please, people, don't post answers like this, someone who actually knows the answer might think it's already answered.
[jQuery] Re: Getting the child element on click
$('.feature h2').click(function() { $(this).siblings('p').slideToggle(); return false; });
[jQuery] Re: input field name include . jquery cann't parse
Poor choices is relative. I'd love a way to use colons in IDs avoiding the confusion with pseudo-selectors, kind of like namespacing elements. If it's in the specs it's perfectly valid. On May 26, 9:17 am, MorningZ morni...@gmail.com wrote: No, it's not a bug, your selector is looking for an item of class name... so it's your selector that is the issue, not jQuery (your naming/id convention would also cause issues with CSS)... If you insist on poor choices for naming your controls, it is still possible to select the items though http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_... On May 26, 4:09 am, weit...@263.net weit...@263.net wrote: when i use jquery get a input like input type=text id=user.name name=user.name/ use $(#user.name) is error if input is input type=text id=username name=username/ use $(#username) is right is bug?
[jQuery] Question on encode/decode of JSON - server-side and client-side
I am building a client-side and server-side solution and want to use JSON through Ajax in both directions. I have ASP or JavaScript server-side, though Microsoft's support of server-side JavaScript seems nil, so I am reluctantly conceeding to use ASP. I'd appreciate suggestions on available solutions to encode/decode JSON on the server-side (ASP or JavaScript). I don't plan to load jQuery server-side so that rules out plug-ins. I'd also like to know what is the latest client-side encode/decode for JSON. Is it built in jQuery or a plug-in? In both server and client, decoding JSON securely is key, so using eval () to decode is out. Thanks, Sam
[jQuery] Re: Getting the child element on click
You're a hero. I didn't even know about the slideToggle() function, I was using an if statement to test if the p was hidden - thanks a ton. Matt On May 26, 7:57 pm, M.M. mario.maru...@gmail.com wrote: $('.feature h2').click(function() { $(this).siblings('p').slideToggle(); return false; });
[jQuery] Re: jQuery, the Ready Function, and Other Javascript - A Dirt Simple Inquiry
1. Do you get errors if you remove the last 2 spry scripts? 2. Regardless of which script does what, you should put the $().ready ( always after all the scripts as a safety measure, there's no negative impact. 3. If I remember a recent discussion, you shouldn't use the vsdoc version of jQuery, it's only for the VS auto-complete. Load the normal one from http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js On May 26, 4:22 am, kiusau kiu...@mac.com wrote: QUESTION: What is the general rule for using the Ready function in the presence of other Javascript? BACKGROUND: I have recently discovered that my previous problems with the customization of the jQ Impromptu plug-in could be overcome through isolation. In effect, I removed my script from the targeted document, eliminated all of my self-created jQuery methods with the exception of one, and tried the package in a different, separate document. Everything functioned as intended. With renewed confidence I am now ready to return the package to the originally targeted document. This is where you may be able to help. Please examine the script below and note that I am using the Ready function in combination with other script tags. I have organized the script tags according to use or non-use with the Ready function. Everything before the Ready function is called either directly or indirectly by the Ready function. Everything after it is not. Do you see a possible source of error? link href=../SpryAssets/SpryAccordion.css rel=stylesheet type=text/css / link href=../SpryAssets/SpryMenuBarHorizontal.css rel=stylesheet type=text/css / link href=../CSS/imagine.css rel=stylesheet type=text/css / link href=../CSS/jQ_Impromptu.css rel=stylesheet type=text/css / script src=../JavaScript/jQuery-1.3.2-vsdoc2.js type=text/ javascript/script script src=../JavaScript/errorMessages.js type=text/javascript/ script script src=../JavaScript/popUpBoxConfiguration.js type=text/ javascript/script script src=../JavaScript/jQ_browserIdentification.js type=text/ javascript/script script src=../JavaScript/jQ_Impromptu-2.5.js type=text/ javascript/script script src=../JavaScript/jQ_Imagine.js type=text/javascript/ script script src=../JavaScript/SVG_roundies_0.0.2a.js type=text/ javascript/script script type=text/javascript $(document).ready(function() { $('#today').toDate(); $('#clock').JSClock(); $('#duration').timePassed(); $('body').SVG_RoundiesIntializer(); $().getBrowserInformation(); }); /script script src=../SpryAssets/SpryAccordion.js type=text/javascript/ script script src=../SpryAssets/SpryMenuBar.js type=text/javascript/ script Roddy
[jQuery] Re: Barcode Plugin : ean 8, ean 13, code 128 and some others directly in css (so ok for ie)
Barcode JQuery Plugin : 1.1 Changelog : standard 2 of 5 fixed
[jQuery] Re: Jquery Block plugin
In a simplistic form $(#BlockID).block(); $.ajax( success: function(results) { // Do stuff with results $(#BlockID).unblock(); }, error: function(x,y,z) { //x.responseText has the server error text $(#BlockID).unblock(); } ); On May 26, 12:28 pm, Atticus michaelfal...@gmail.com wrote: Hi all. I was trying to use the Block plugin. I really need to show a modal popup on AjaxRequest and Stop it on Request End. How can I do that. I have seen etTimeout($.unblockUI, 6000), but I need to run server code,so I need to set this time out to the elapsed time in my server method. Thanks
[jQuery] Re: input field name include . jquery cann't parse
So if you had: input type=text id=user.name / how would you apply a style to that? can't say: #user.name { } because that would look for input type=text id=user class=name / yeah, poor choice sure is relative, but why make things more difficult, when a simple dash or underscore would do the same thing (and not cause issues with basic CSS or jQuery) On May 26, 3:03 pm, Ricardo ricardob...@gmail.com wrote: Poor choices is relative. I'd love a way to use colons in IDs avoiding the confusion with pseudo-selectors, kind of like namespacing elements. If it's in the specs it's perfectly valid. On May 26, 9:17 am, MorningZ morni...@gmail.com wrote: No, it's not a bug, your selector is looking for an item of class name... so it's your selector that is the issue, not jQuery (your naming/id convention would also cause issues with CSS)... If you insist on poor choices for naming your controls, it is still possible to select the items though http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_... On May 26, 4:09 am, weit...@263.net weit...@263.net wrote: when i use jquery get a input like input type=text id=user.name name=user.name/ use $(#user.name) is error if input is input type=text id=username name=username/ use $(#username) is right is bug?
[jQuery] [New Plugin] jQuery Generic Pagination
I figured I'd drop a message out to the board about a new plugin I've finished documenting and released, called Pagination. It's a small, relatively simple jQuery plugin which makes rendering and managing Pagination controls very easy. It automatically generates groupable controls, which can be themed, moved, and reused without a lot of overhead. The plugin is open ended, allowing the user to define how they want to render the content. It's a very simple way to create grouped pagination triggers. If ya'll could take a look at the docs and demo, and let me know if you have any suggestions, or come upon any problems, that'd be great. Thanks. :D Documentation: http://eric.garside.name/docs.html?p=pagination Demo: http://eric.garside.name/demo.html?p=pagination
[jQuery] Re: Question about Tutorial: Find me: Using selectors and events
A partial answer to my question on the difference between mouseenter and mouseover, in the jQuery documentation, Events/mouseenter (http:// docs.jquery.com/Events/mouseenter#fn), it states, then illustrates, that mouseover fires when the pointer moves into or out from child element, while mouseenter doesn't. --Carol
[jQuery] Parents without a particular child
I've been staring at code for way too long. I have a data structure like: ul id=mylist li class=activeStuff a href=# class=movethisMove/a/li li class=activeMore Stuff/li /ul How do I get the li that doesn't have 'a.movethis'?
[jQuery] Superfish open menu with ENTER key
Hello I am using Superfish 1.4.8 for making a keyboard accessible menu with sub levels that open only when the user has tabbed to the option (focus is active on the element) and then presses the ENTER key. The reason for this is that this is intended for browsing with screen reader applications that will get confused if the sub level opens automatically, it needs to be done until the user requests it. Is there any way to use the click event instead of focus to open the menu? I am thinking about this line: $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call ($li);}); and tried modifying it using click instead of focus but the blur events starts working strange like closing the whole menu when the first option loses focus. Any help will be really appreciated. Thank you!!
[jQuery] Re: Newbie question- declarative selectors inside procedural code
Just to finish this one off, I discovered my problem in IE6 was nothing to do with the jquery search operation we were discussing. As I was working on the code I had added an object initialisation above the line in question that had an extra comma at the end, as in- var frames= { EM: 1*offset, . . . YH: 10*offset, //extra comma here }; IE6 choked on this, whereas Firefox was quite happy with it. I've done enough little bits of Perl, PHP, and now JavaScript over the years that I have terrible trouble remembering exactly which bits of syntax will or won't work with each! Thanks again to Jason, my little dynamic map works like a charm. Regards: colin_e On May 25, 8:29 pm, kiusau kiu...@mac.com wrote: On May 25, 3:44 am, Jason Persampieri papp...@gmail.com wrote: Certainly... you're really not all that far off at all... let me just point out a couple of things. Very nice presentation! It is likely that many novice users of jQuery will be able to benefit from it. Please do respond to the originator's question about the use of :first-child in IE, and suggest a work around if, indeed, it is an issue. Roddy
[jQuery] Re: Where to find a proper slide effect?
Like probably a lot of people at this point, I'm hesitant to offer a mere suggestion since you seem to want a complete solution worked out for you. But your example does a simple toggle, which is a wrapper around the animate function. I would say, try using animate() directly and experiment with the parameters. From all indications, the toggle bumps the div out to its 360px height (per the style attribute) and then does it's animation. Since you have chosen the minified jquery I can't breakpoint and see what exactly the sequence of actions is while the animation is running. On May 26, 2:49 pm, M.M. mario.maru...@gmail.com wrote: On May 26, 8:32 pm, tain bugi@gmail.com wrote: they only have different easing value..otherwise they are identical. No they're not! Are we looking at the same page? The effect you get when you click Slide Out or Slide In onhttp://docs.jquery.com/Tutorials:Live_Examples_of_jQueryis NOT the slide effect I want. It's not even similar to scriptaculous effect in my example, because the text doesn't go with the slide, it just stays in place and gets revealed (it's normal jQuery 'slide' effect, in jQuery UI it's called 'blind') Please, people, don't post answers like this, someone who actually knows the answer might think it's already answered.
[jQuery] number of checked boxes
Hello all, I have a form with some checkboxes and I would like to submit it (through jquery) only if at least 1 checkbox is checked, otherwise I want to display an alert message. How can I get the number of checked boxes? I tried$(INPUT[type='checkbox']).is(':checked') but looks like it doesn't work. Any ideas about how I can achieve so? Thanks and have a nice day! Sig
[jQuery] Re: number of checked boxes
var checked = $(input[type=checkbox]:checked).length; if (checked = 1) { // do something } On May 26, 11:27 am, macsig sigbac...@gmail.com wrote: Hello all, I have a form with some checkboxes and I would like to submit it (through jquery) only if at least 1 checkbox is checked, otherwise I want to display an alert message. How can I get the number of checked boxes? I tried $(INPUT[type='checkbox']).is(':checked') but looks like it doesn't work. Any ideas about how I can achieve so? Thanks and have a nice day! Sig
[jQuery] Re: Parents without a particular child
Disregard, I changed the data to make a little more sense. On May 26, 4:59 pm, Todd Rafferty web...@gmail.com wrote: I've been staring at code for way too long. I have a data structure like: ul id=mylist li class=activeStuff a href=# class=movethisMove/a/li li class=activeMore Stuff/li /ul How do I get the li that doesn't have 'a.movethis'?
[jQuery] Re: input field name include . jquery cann't parse
$(#user\\.name) seems to work in FF3. Haven't tried in other browsers. On May 25, 10:09 pm, weit...@263.net weit...@263.net wrote: when i use jquery get a input like input type=text id=user.name name=user.name/ use $(#user.name) is error if input is input type=text id=username name=username/ use $(#username) is right is bug?
[jQuery] Re: number of checked boxes
Thanks for your help. I appreciate it Sig On May 26, 2:44 pm, James james.gp@gmail.com wrote: var checked = $(input[type=checkbox]:checked).length; if (checked = 1) { // do something } On May 26, 11:27 am, macsig sigbac...@gmail.com wrote: Hello all, I have a form with some checkboxes and I would like to submit it (through jquery) only if at least 1 checkbox is checked, otherwise I want to display an alert message. How can I get the number of checked boxes? I tried $(INPUT[type='checkbox']).is(':checked') but looks like it doesn't work. Any ideas about how I can achieve so? Thanks and have a nice day! Sig
[jQuery] Question about strange Superfish behaviour
Hello, Thanks for making such a great extension as Superfish available to Joomla users. I am having a strange problem with the menu when I try to use it on my site with vertical configuration. When the page loads it appears fine. However, after hovering over each menu item, the color of the menu turns to grey and stays that way until I refresh the page. Surely this cannot be the way the menu is designed and must be a problem on my part. An example of this issue can be seen here: http://turkanabasin.org/review Just mouse-over and mouse-off any menu item and see what I mean. Thanks in advance for any insight.
[jQuery] Force the browser to render window
Is there a javascript or jQuery method available to force the browser to render the contents of the window? This would something similar to updating the stage in Director or Flash. I have a two-column interaction set up where users input information in one column and see their results in another. Safari, Firefox, etc all work perfectly. IE however needs an extra click anywhere on the browser window for the results to appear. So I'm looking for a way to attach a function to a UI control that 'forces' IE to render the screen so the changes appear. Thanks.
[jQuery] Values (a cheesy intro to a very useful plugin)
http://plugins.jquery.com/project/Values Think of this as val() crossbred with serializeArray() and raised on steroids. Or a JSON-HTML mapping tool. Or a template plugin that can handle complex data structures, works in reverse and uses only HTML as its syntax. It works with single values. It works with value arrays. It works with whole objects. Or all three combined. Oh, and did i mention that it is really easy to configure and/or extend? Flexibility abounds, but it mostly just works, making your code robust and simple. Just remember, it has a generic name, because it is generally useful (and values() makes more sense as a method than mycoolpluginname()). Here's a little demo of some of the simpler abilities: http://jquery-values.googlecode.com/svn/trunk/jquery.values.htm Here's a link to the latest version: http://jquery-values.googlecode.com/svn/trunk/jquery.values.js If you're curious about how it works but don't feel like reading the docs, here's the short version: - Put a name attributes on an element (any, not just input/select/textarea) - Call values() on that element (or a parent!! this is a key part!) to get back a JSON version. - Call values(myJSON) on that element to push values into the element(s) - Call values('foo') to get just the one value. - Call values('foo', 'bar') to set just the one value. This all works well with nested objects and arrays too. After all, the world is not flat; your data (or markup) shouldn't have to be either. Both JSON and HTML contain a lot of information in their very structure and types. Values takes advantage of this to make intelligent choices about how to map one to the other. If you ever disagree about those decisions or want to amend them, there's quite a few configuration options and ways to extend the plugin to handle new element types or just handle familiar ones differently. If you are using javascript to do anything more than make your pages do shiny animations, you have probably come across the need to write data into a page, extract data from your markup or just copy data around the page. jQuery's html(), text(), val() and even attr() methods are handy, but they only do so much for you. You still have to select the right elements to get/set the data and know which method is appropriate. In development especially, when your markup and/or data structures are frequently changing, this can become a pain point. Or even if it doesn't pain you, values() is a better way! Anyway, give it a try! It's fun! It's easy! Everyone is... wait... no, everyone is not doing it. At least, not yet. That's why i'm writing this. I think i've got something helpful here, and i'd like to share. I want all the joy and ego validation that having many users brings. But more than that, i want bug finders. I want bug fixers. I want help with docs and demos and extensions. I want good user questions. I want YOU! So, give it a try and send me some feedback. I can handle the abuse (i hope). Just reply to this email or write the list with [Values] in the subject so that i notice you. thanks, nathan
[jQuery] [validate] IE8 Does Not Work
I was wondering if there was an update for validate plugin because it does not work in IE8 and even though i do server side thats sucks Thanks Rick
[jQuery] Odd .hover effect in IE7
Using hover effect works fine in Firefox however it produces an odd effect in IE7. On hover the background-image gives the appearance of shifting up 1px and to the left 1px, also the text font changes. The background-image has rounded corners, the hover effect changes the corners to appear straight. Very strange. The lite version of the page code is below. --- [ external js file (using jquery v1.3.2) ] --- $(document).ready(function() { $(ul#menu_primary li a).hover( function() { $(this).animate({ opacity: 0.75 }, fast); $(this).animate({ opacity: 1.0 }, fast); // OR //$(this).fadeTo(fast, 0.75); //$(this).fadeTo(fast, 1.0); } ); }); --- [ css ] --- #pagenav {background:#FFF url(/include/graphic/theme/1/ bkgrd_pagenav_hp.png) no-repeat left top !important;} #pagenav #menu_primary {height:41px;list-style-type:none;margin-bottom: 0;} #pagenav #menu_primary li {float:left;margin:0;} #pagenav #menu_primary li a {color:#FFF;display:block;text- align:center;text-decoration:none;width:156px;} #pagenav #menu_primary li a:visited {color:#FFF;} #pagenav #menu_primary li a:hover {color:#66B7EC;} #pagenav #menu_primary li a#itemA {background:url(/include/graphic/ theme/1/menu_itemA.png) no-repeat left top !important;} #pagenav #menu_primary li a:hover#itemA {background:url(/include/ graphic/theme/1/menu_itemA.png) no-repeat left bottom !important;} --- [ html ] --- div class=grid_16 id=pagenav ul class=grid_16 alpha id=menu_primary lia href=/ id=itemAItem A/a/li lia href=/ id=itemBItem B/a/li lia href=/ id=itemCItem C/a/li lia href=/ id=itemDItem D/a/li lia href=/ id=itemEItem E/a/li lia href=/ id=itemFItem F/a/li /ul div class=clear/div /div I appreciate all suggestions. -brian-
[jQuery] Suckerfish - issue with vertical styling
Hello, Thanks for making such a great menu system as Suckerfish available to the Joomla community. I am having trouble with the vertical styling of the menu. On mouse- over and mouse-off, every menu item turns to a grey color and stays that way until I refresh the page again. Any suggestions? Here is an example of this. Check out the orange vertical menu on this page: http://turkanabasin.org/review Thanks in advance for your insight.
[jQuery] Re: ajax append problem
When i try this i get an error object required in IE6 and 7. any thoughts? On Apr 27, 10:10 pm, Ricardo ricardob...@gmail.com wrote: I think you have to separate the selector otherwise it's just a hash: $(.content).load(test.html #content); http://docs.jquery.com/Ajax/load On Apr 27, 5:14 pm, Charlie charlie...@gmail.com wrote: $(.content).load(test.html#content); this will grab only theidcontent from test.html andloadit , can refine this down to elements within #content as well example on jQuery site shows same methodclicforw...@googlemail.comwrote:Hello Michael, thanks for this. I got a error: html.find is not a function Any idea? script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'/script script type=text/javascript $(document).ready(function(){ $.ajax({ url: leistung.html, cache: false, success: function(html) { var loadCont = html.find('#cont'); $(.content).append(loadCont); } }); }); /script On Apr 27, 5:07 pm, Michael Lawsonmjlaw...@us.ibm.comwrote:instead of $(.content).append(html); do var contentToAppend = html.find(#cont); $(.content).append(contentToAppend); cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-828-355-5544 E-mail: mjlaw...@us.ibm.com'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: clicforw...@googlemail.comclicforw...@googlemail.com To: jQuery (English)jquery-en@googlegroups.com Date: 04/27/2009 11:03 AM Subject: [jQuery]ajaxappend problem Hello, im using this script toloada external site into my DOM. It works fine but i need just a part of this test.html. For example: I want to append just the div #cont from test.html How can i do that? script type=text/javascript $.ajax({ url: test.html, cache: false, success: function(html){ $(.content).append(html); }}); /script Thanks for Help! graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] Re: Jquery Block plugin
In a simplistic form $(#BlockID).block(); $.ajax( success: function(results) { // Do stuff with results $(#BlockID).unblock(); }, error: function(x,y,z) { //x.responseText has the server error text $(#BlockID).unblock(); } ); Even simpler, from the main BlockUI doc page: http://www.malsup.com/jquery/block/ $().ajaxStart($.blockUI).ajaxStop($.unblockUI);
[jQuery] Re: [New Plugin] jQuery Generic Pagination
The demos look great, Eric! I'm sure this will come in handy! Congrats! Rick On Tue, May 26, 2009 at 4:55 PM, Eric Garside gars...@gmail.com wrote: I figured I'd drop a message out to the board about a new plugin I've finished documenting and released, called Pagination. It's a small, relatively simple jQuery plugin which makes rendering and managing Pagination controls very easy. It automatically generates groupable controls, which can be themed, moved, and reused without a lot of overhead. The plugin is open ended, allowing the user to define how they want to render the content. It's a very simple way to create grouped pagination triggers. If ya'll could take a look at the docs and demo, and let me know if you have any suggestions, or come upon any problems, that'd be great. Thanks. :D Documentation: http://eric.garside.name/docs.html?p=pagination Demo: http://eric.garside.name/demo.html?p=pagination -- -- Ninety percent of the politicians give the other ten percent a bad reputation. Henry Kissinger
[jQuery] Re: Newbie question- declarative selectors inside procedural code
Excellent! Glad to see you figured that one out. Rest assured that *every* web developer has pulled out hair related to that particular issue. Fortunately, in many editors today, you can run a tool called 'jslint' that does a simple syntax check for you. In my editor (TextMate), I actually have it set up to do that check every time I save. _jason On May 26, 2:05 pm, colin_e colin.ev...@nhs.net wrote: Just to finish this one off, I discovered my problem in IE6 was nothing to do with the jquery search operation we were discussing. As I was working on the code I had added an object initialisation above the line in question that had an extra comma at the end, as in- var frames= { EM: 1*offset, . . . YH: 10*offset, //extra comma here }; IE6 choked on this, whereas Firefox was quite happy with it. I've done enough little bits of Perl, PHP, and now JavaScript over the years that I have terrible trouble remembering exactly which bits of syntax will or won't work with each! Thanks again to Jason, my little dynamic map works like a charm. Regards: colin_e On May 25, 8:29 pm, kiusau kiu...@mac.com wrote: On May 25, 3:44 am, Jason Persampieri papp...@gmail.com wrote: Certainly... you're really not all that far off at all... let me just point out a couple of things. Very nice presentation! It is likely that many novice users of jQuery will be able to benefit from it. Please do respond to the originator's question about the use of :first-child in IE, and suggest a work around if, indeed, it is an issue. Roddy
[jQuery] Re: Force the browser to render window
I'm not understanding the extra click anywhere part. Is it a 'blur' that is triggering something? Exactly how are you doing what you're doing? Maybe it's just an IE bug where things are not working as expected. If you could show us how you're doing what you're doing, maybe we could help debug it and find a workaround. On May 26, 11:52 am, foldiman vi...@vinceallen.com wrote: Is there a javascript or jQuery method available to force the browser to render the contents of the window? This would something similar to updating the stage in Director or Flash. I have a two-column interaction set up where users input information in one column and see their results in another. Safari, Firefox, etc all work perfectly. IE however needs an extra click anywhere on the browser window for the results to appear. So I'm looking for a way to attach a function to a UI control that 'forces' IE to render the screen so the changes appear. Thanks.
[jQuery] Re: Textarea value with javascript
I've never used fckEditor before, but how about try using Firebug to walk through the HTML to locate the parts created by fckEditor and see how you can reference it. I found it very useful for referencing parts of the DOM created by other plug-ins or scripts I'm not familiar with. On May 26, 4:01 am, saa...@gmail.com saa...@gmail.com wrote: Yeah On 26 maijs, 16:53, Caires Vinicius caire...@gmail.com wrote: You tried the innerHTML? On Tue, May 26, 2009 at 10:21 AM, saa...@gmail.com saa...@gmail.com wrote: Good day How can I get current textarea that was changed in fckEditor value with javascript. I got: textarea name=comment id=commentHello/textarea Then happens this: $('textarea').fck({ path:'/fckeditor/' }); , so now I get fckEditor insted my textarea. Then I change the original text in fckeditor to Hello world. When I press the button with javascript like this: function myfunc(formid) { gotForm = document.getElementById(formid); newContent = gotForm.elements.comment.value; } Variable 'newContent' still has value only Hello, NOT new value Hello world. So the question - how can I get new value of fckEditor with my javascript? Best regards- Paslēpt citēto tekstu - - Rādīt citēto tekstu -
[jQuery] Re: number of checked boxes
Or... you could use a shorter selector var checked = $(':checkbox:checked').length; -Mensagem Original- De: Macsig Para: jQuery (English) Thanks for your help. I appreciate it On May 26, 2:44 pm, James james.gp@gmail.com wrote: var checked = $(input[type=checkbox]:checked).length; if (checked = 1) { // do something }