[jQuery] visible divs and selectors
Hi folks, I'm having difficulty with a flicker/repaint of an 'unhidden' div in the following scenario A user clicks on a region of an image map and triggers the following function which 'unhides' previously populated divs, each with an id of the clicked region and each containing a list of businesses in that region. I'm sure there is a more elegant way of doing this, but what my code below is sort of doing is to hide all visible divs and then unhide the one associated with the clicked region on the map. There is a bulldozer in there as I hide all divs, whether they are visible or not - simply because I don't know how to specify the one that is showing (or to exclude the one to be shown). These points of good style aside, the code does most of what I require. What I can't understand is that when I click a second region (placing me in the first part of the if statement), the unhidden div becomes visible but then disappears before returning to stay. I thought that by putting the ..$(#+ej).show(600);.. bit in a function after the divs were hidden would mean that the unhiding of the ej div would occur after all the others had been (re)hidden. The code behind this is: function chooseRegion(ej){ var pj = $('#regions div'); if (pj.is(':visible')){ //console.log(1 + ej); $(pj).hide(100,function(){ $(#+ej).show(600);}); } else { //console.log(2 + ej); $(#+ej).show(500); }; } How do I stop the refresh/flicker - or how can I approach this in a better way? Thanks, Bruce
[jQuery] Re: addClass('floatsToRight') doesn't work, but .css('float', 'right') does
Yes, you were both right. Many thanks On 10 Gru, 21:01, MorningZ morni...@gmail.com wrote: that would have been my suggestion as well Firebug would be a huge help for you here, as floatsToRight will show in the HTML tab as over ridden if that's the case On Dec 10, 2:54 pm, Leonardo K leo...@gmail.com wrote: Maybe you have a style that override the float right property. 2009/12/10 Łukasz Podolak lukasz.podo...@gmail.com Hey, I have one css clas, that looks like this: .floatsToRight { float: right; } my jquery code is doing the following: $('ul.gallery li:not([class=main]) div.title:even').addClass ('floatsToRight') however, this class is not applied. Instead, if I use the direct css, it works: $('ul.gallery li:not([class=main]) div.title:even').css('float', 'right') What's more interesting, having defined a sample class like: .yellowBorder{ border: solid 1px yellow; } the code: $('ul.gallery li:not([class=main]) div.title:even').addClass ('yellowBorder') works! so, is there anything special that I can't apply classes that set the float property? or is this a bug? thanks
[jQuery] jQuery no conflict question
Hi list, I am wondering how to set my jQuery to be in 'noconflict' state. My jQuery is loaded after prototype and so accordingly to the docs I should put this in my script: jQuery.noConflict(); // Put all your code in your document ready area jQuery(document).ready(function($){ questionList(); ... } At the place of the ... I call my functions, which are written in 'normal' jQuery style and are defined by: function questionList(){ ... } Somehow this doesn't work as some of the script is missing right away... Any hint is appreciated! Henjo
[jQuery] Best Service
Recently, I had a chance to outsource a project to Globosoft Technologies. They produce high quality work at a reasonable cost. If you are looking for the services like custom Website, CMS, Clone, e-commerce, Network support and SEO you should definitely check Globosoft Technologies first. Here is their website address http://www.globosoft.com -- View this message in context: http://old.nabble.com/Best-Service-tp26744096s27240p26744096.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Best Service
This topic makes the Report spam quite usefull. Thanks. On Dec 11, 2:14 pm, globosoft skhalid@gmail.com wrote: Recently, I had a chance to outsource a project to Globosoft Technologies. They produce high quality work at a reasonable cost. If you are looking for the services like custom Website, CMS, Clone, e-commerce, Network support and SEO you should definitely check Globosoft Technologies first. Here is their website addresshttp://www.globosoft.com -- View this message in context:http://old.nabble.com/Best-Service-tp26744096s27240p26744096.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
RE: [jQuery] Best Service
You' think Mr. globosoft would at least attempt to mask the attempt to market deceitfully by not sending his message using the company name as his name, as well as sending the message from a non-globosoft web address (skhalid.gst). So much for subtlety... (and command of the subtleties of English) -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of globosoft Sent: Friday, December 11, 2009 8:15 AM To: jquery-en@googlegroups.com Subject: [jQuery] Best Service Recently, I had a chance to outsource a project to Globosoft Technologies. They produce high quality work at a reasonable cost. If you are looking for the services like custom Website, CMS, Clone, e-commerce, Network support and SEO you should definitely check Globosoft Technologies first. Here is their website address http://www.globosoft.com -- View this message in context: http://old.nabble.com/Best-Service-tp26744096s27240p26744096.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jQuery no conflict question
On Dec 11, 7:14 am, Henjo henjohoek...@gmail.com wrote: I am wondering how to set my jQuery to be in 'noconflict' state. [ ... ] function questionList(){ ... } I'm wondering if you are using the $ shortcut to jQuery inside such functions. If you are, then those functions must be inside some scope which redefines $, because in the global scope, $ is referring to Prototype. You can fix this by using jQuery instead of $ in your functions, or by wrapping them in a scope which defines $ temporarily to jQuery. You can do this by putting them inside your document ready block the way you list above, supplying $ as the parameter to your function, or by wrapping them in a scope like this: // in the global scope here, $ refers to Prototype (function($) { // here $ refers to jQuery. function questionList() { // and you can use $ for jQuery inside this function. } })(jQuery); // again here, $ refers to Prototype If by some chance you have blocks of script that want to use both Prototype and jQuery, you simply have to avoid using $ for jQuery, although you can define your own shortcut like so: var $jq = jQuery.noConflict(); Cheers, -- Scott
[jQuery] IE 6 Form Input's wont work entire site
Hello, I had very interesting problem with our latest project. Our php cms system depends on jquery in any mean of javascript business. We/Customers are happy to use it. And our last project someting weird was happened. We can't use forms in IE6 are any mean... Problem was simple when you load the site with IE6. Inputs does not take any input. Just blank... Selects, radios are work.. Even forms with does not have any business with jquery has freezed. Following jquery related scripts are included to page jquery.js jquery-ui.js i18n/ui.datepicker-de.js jquery.bgiframe.min.js FCKEditor/jquery.FCKEditor.js jquery.bdc.ddmenu.pack.js jquery.boxy.js jqueryFileTree.js jquery.cycle.all.pack.js jquery.validate.js localization/messages_de.js jquery.masked_input.min.js jquery.bt.js localization/messages_de.js jquery.autocomplete.js jquery.datepick.js jquery.datepick-de.js Our previous setup has similar config and work with no problem... Also We can get any means of error message. Just inputs are wont get any input. Does anyone ive any clue about problem. Regards...
[jQuery] Re: visible divs and selectors
Any chance you could post a small test case somewhere? I *think* I understand what's happening, but without seeing it, it's hard to diagnose. -- Scott
[jQuery] Re: jQuery no conflict question
Hi Scott, I do not get the syntax completely, but will definitely give it a try. Thanks for posting back! Henjo On Dec 11, 2:54 pm, Scott Sauyet scott.sau...@gmail.com wrote: On Dec 11, 7:14 am, Henjo henjohoek...@gmail.com wrote: I am wondering how to set my jQuery to be in 'noconflict' state. [ ... ] function questionList(){ ... } I'm wondering if you are using the $ shortcut to jQuery inside such functions. If you are, then those functions must be inside some scope which redefines $, because in the global scope, $ is referring to Prototype. You can fix this by using jQuery instead of $ in your functions, or by wrapping them in a scope which defines $ temporarily to jQuery. You can do this by putting them inside your document ready block the way you list above, supplying $ as the parameter to your function, or by wrapping them in a scope like this: // in the global scope here, $ refers to Prototype (function($) { // here $ refers to jQuery. function questionList() { // and you can use $ for jQuery inside this function. } })(jQuery); // again here, $ refers to Prototype If by some chance you have blocks of script that want to use both Prototype and jQuery, you simply have to avoid using $ for jQuery, although you can define your own shortcut like so: var $jq = jQuery.noConflict(); Cheers, -- Scott
[jQuery] Re: jQuery no conflict question
Well, I tried this, but no matter where I put it, it gave me the error the function was not defined... So I decided to find/replace all $ with jQuery. It does the job. Thanks anyways! Henjo On Dec 11, 2:54 pm, Scott Sauyet scott.sau...@gmail.com wrote: On Dec 11, 7:14 am, Henjo henjohoek...@gmail.com wrote: I am wondering how to set my jQuery to be in 'noconflict' state. [ ... ] function questionList(){ ... } I'm wondering if you are using the $ shortcut to jQuery inside such functions. If you are, then those functions must be inside some scope which redefines $, because in the global scope, $ is referring to Prototype. You can fix this by using jQuery instead of $ in your functions, or by wrapping them in a scope which defines $ temporarily to jQuery. You can do this by putting them inside your document ready block the way you list above, supplying $ as the parameter to your function, or by wrapping them in a scope like this: // in the global scope here, $ refers to Prototype (function($) { // here $ refers to jQuery. function questionList() { // and you can use $ for jQuery inside this function. } })(jQuery); // again here, $ refers to Prototype If by some chance you have blocks of script that want to use both Prototype and jQuery, you simply have to avoid using $ for jQuery, although you can define your own shortcut like so: var $jq = jQuery.noConflict(); Cheers, -- Scott
[jQuery] How can I make some change in superfish dropdown menu
Hello every body I want to make some change to this joomla module I want to make this complately RTL for persian language ( all level of menues shifting to right and direction is rtl for all levels ) How can I do that ? I'm new in java and css too :) Best regards Bahman Zendeh Sher.
[jQuery] IE 7-8 bug on menu loading when mouse is over the menu
I have this issue in IE only, i've search in the forum but i didn't found nothing about that on page loading, if the mouse is over the menu IE throws an error this is what the debbugger throws in jquery.js line 25 nodeType null or non an object if(elem.nodeType==3||elem.nodeType==8 firefox works well, at least firebug doesn't show anything superfish.js and supersubs.js are loading after jquery.js any ideas will be welcome
[jQuery] [validate] show status indicator while conducting a remote validation
Hi, I was wondering if it's possible to show an icon or label while the Validate plugin (http://docs.jquery.com/Plugins/Validation) is waiting on the response from a Remote rule. Ideally I would like to show a progress indicator to inform the user that the element is being validated in case of a slow connection or slow server response time. cheers, Marc.
[jQuery] superfish - nav-bar style menu conflict with mootools
Hi came across a situation where i am using the nav-bar style menu in conjunction with Slideshow 2 with mootools.(http:// www.electricprism.com/aeron/slideshow/). I noticed that the current style isn't behaving properly, and also rolling over to ul li for another main header, the ul li overlap each other. Appreciate your insights.
[jQuery] detecting edge cases when swapping divs
Hello, I have basic js knowledge, and just started playing with jQuery. I am doing an experiment where when you click an UP/DOWN ARROW link, the box will slide up/down throughout the page. I found a generic swap function online and modified it for jQuery use. Now I want to refine it more. I'd like to: 1) When the box is under the HEADER make the UP ARROW disappear, because we don't want this box to go farther than that. 2) Same when the box is above the FOOTER, make the DOWN ARROW disappear so it won't go down anymore on the page. Here is my test page: http://bit.ly/7uN0ly The jQuery code is at the bottom if you view the source. Additional Notes: I know I can make the ARROW disappear if I add $(this).css (visibility,hidden); How come I can't do $(this).parents().prev(div).is(#footer) to detect the footer div? The header will always be the first div inside the body, the footer will always be the last div inside the body. Thanks for any help! I'm just stuck trying to detect these edge divs. ~Abbey
[jQuery] List item animation
Hi, I'm a jQuery newbie and need someone to point me in the right direction. I want to fade in a list of items but have each item fade in when the previous item is done fading, as opposed to having them all fade in at the same time. I want to do this in groups. So let's say the list has 100 items but I only want to show 5 at a time. After 10 seconds these 5 items fade out and the next 5 load, each fading in after the previous item is entirely visible. I have done this in ActionScript, but with jQuery my main confusion is with dealing with loops after setTimeout events. In ActionScript I always got away with using the timeline to deal with time, but I don't have that luxury with JavaScript. Here's as far as I go before getting stuck: var itemsToShow = itemsToShow || 5 var current = current || 0; var itemArray = [One,Two,Three]; for( i=0+itemsToShow; i itemsToShow; i++){ $(#itemList).append(li+itemArray[i]+/li); $(li).animate({opacity: toggle}, { duration: slow }); }
[jQuery] superfish in a div
Hello, I need advise please, I put the ul's of the superfish in a div, yet somehow that div need to be style with a certain height to make this div containing ul superfishpositioned nicely on the top of other div, I am a beginner in css as well, is this a css issue? thanks a lot in advance regards Akil
[jQuery] Superfish z-index
Since top navigation drop menus tend to need to go above other page content (usually in divs), it would be a good idea to alter your css to include a large z-index for the sub menu items so it works out of the box (particularly in regards to i.e.6).
[jQuery] Re: Use link to auto fill form fields w/jquery
Greetings all: I am using jquery fancy box to open up a form. However, I want to image link that I click to not only open up the form but also auto populate the form with a couple of peices of information. The form fields value will change for several different pages. For example, when someone clicks on acls link the form field of Course will be populated with acls and the form field of cost will be populated with $60.00 I got the auto populate function to work when I was using regular javascript but since I changed to opening the window/form using jquery it not longer works. Any help would be greatly appreciated! Wojo
[jQuery] jQuery(document).ready - errors prevent further jQuery code from executing
I searched around and couldn't find an answer for this. I'm in a bind because I'm developing JS that is used in a web framework, and is frequently mixed in with other developers' jQuery code. Unfortunately errors in their jQuery(document).ready blocks prevent mine from executing. Take the following simple sample: script type=text/javascript jQuery(document).ready(function() { nosuchobject.fakemethod(); //intentionally cause major error }); /script script type=text/javascript jQuery(document).ready(function() { alert(Hello!); //never executed }); /script Why is is that an error in on ready block will prevent further ready blocks from executing? Is there a safe way to run jQuery (document).ready that will run even in the case of previous errors? Thanks for any pointers.
[jQuery] autocomplete - how to open dropdown with function
I'm using jQuery plugin: Autocomplete, in a field id=inputsearch. The question, is how is it possible to open the dropdown programmatically frmo javascript in the page. thanks for the help Alex $(#inputsearch).autocomplete(${topicList}, { formatItem: function(item) { return item.display; }, minChars:0 })
[jQuery] load() function and IE8
I fat fingered the last one so... I have this piece of code $(#AP_PONum).live(change, function(){ ap_po = $(option:selected,this).val(); $(#content-box).load(webapps/finished_jewelry/PurReq/display/ dsp_addPurchaseRequest.cfm?poNum=+ap_po); }); which works like a champ in firefox. it's called from a drop down grabs the ColdFusion template and load it in a div called content-box. This does nothing in IE8, no error, no load, no love.. nothing any ideas on how to work around this?
[jQuery] Text Shapes
Well, i am trying to shape my text like curve up or down, bulge, roof text, bridge text etc. I tried through JavaScript and applied the margin + transform: rotate CSS on my text character by character. But it is not a good approach as far as my view point is concerned. Anyone have idea about it do give your comments. Thanks,
[jQuery] Need to get the index of current table row
I am setting the rows of my grid (which outputs an HTML table) using jquery $('#gvReturnedChecks tr:odd').addClass('odd'); $('#gvReturnedChecks tr:even').addClass('even'); I am selecting a row in the grid to perform an update. I perform the update using an ajax call. I need to know the index of the node being updating. My plan is to use the expression - if (size % 2 == 0) to determine if this is an even or odd row in order to know what color to set the background to, by setting the following class: .addClass('even') or .addClass('odd') I have the object of the current table row, by transversing from the where the 'Select' link was clicked within the row. I have tried using the jquery .index() method and rowIndex to no avail - Neither are returning the index of the row in respect to it's siblings within the table Any help is appreciated - I have googled for hours on this and have been unable to find a solution. Thanks! NOTE - Below is the structure of the table row tr onmouseover=this.originalstyle=this.style.backgroundColor;this.style.backgroundColor='#99' onmouseout=this.style.backgroundColor=this.originalstyle; td align=center a id=gvReturnedChecks_ctl02_lnkDelete class=confirmDelete href=javascript:__doPostBack('gvReturnedChecks$ctl02$lnkDelete','') style=color:#0066CC;Delete/a /tdtd align=center a id=gvReturnedChecks_ctl02_lnkSelect class=select href=javascript:__doPostBack('gvReturnedChecks$ctl02$lnkSelect','') style=display:inline-block;color:#0066CC;width:50px;Select/a /tdtd span id=gvReturnedChecks_ctl02_lblReturnedID class=returnedCheckID7001/span /tdtd span id=gvReturnedChecks_ctl02_lblPlayerName class=playerNameJeffrey Clark/span /tdtd span id=gvReturnedChecks_ctl02_lblCheckNumber class=checkNumber7026844/span /tdtd span id=gvReturnedChecks_ctl02_lblDateCheckIssued class=dateCheckIssued3/2/2009/span /tdtd span id=gvReturnedChecks_ctl02_lblCheckAmount class=checkAmount3.00/ span /tdtd span id=gvReturnedChecks_ctl02_lblDateCheckReturned class=dateCheckReturned3/23/2009/span /tdtd span id=gvReturnedChecks_ctl02_lblClaimNumber class=claimNumber09030200135/span /tdtd span id=gvReturnedChecks_ctl02_lblEnteredBy class=enteredByBob/span /tdtd span id=gvReturnedChecks_ctl02_lblDateEntered class=dateEntered11/1/2009/span /td /tr
Re: [jQuery] [validate] show status indicator while conducting a remote validation
The plugin currently doesn't provide any callbacks for that, but you can use jQuery's ajax events: http://docs.jquery.com/Ajax_Events Jörn On Fri, Dec 11, 2009 at 1:27 AM, Marc marc.ga...@gmail.com wrote: Hi, I was wondering if it's possible to show an icon or label while the Validate plugin (http://docs.jquery.com/Plugins/Validation) is waiting on the response from a Remote rule. Ideally I would like to show a progress indicator to inform the user that the element is being validated in case of a slow connection or slow server response time. cheers, Marc.
[jQuery] Selecting a value from a SELECT field?
Hi, I'm trying to make a bit of code, which will auto-select a value from a SELECT box. Here is the example code: select style=display: inline; id=catid2 name=catid2option value=-- select --/optionoption value=136187Alberta/ optionoption value=136200British Columbia/optionoption value=136229Manitoba/optionoption value=136259Newfoundland and Labrador/optionoption value=136247New Brunswick/ optionoption value=136266Nova Scotia/optionoption value=136272Ontario/optionoption value=136303Prince Edward Island/optionoption value=136306Quebec/optionoption value=136329Saskatchewan/option/select I've tried: $('#catid2').val(136200) ..as well as: $('#catid2').val('British Columbia') ... but neither seem to work. Anyone got any suggestions? TIA! Andy
[jQuery] Re: Selecting a value from a SELECT field?
Have you tried putting the numeric value in quotes? It works fine like that.. here's a link so you can see. http://jsbin.com/iqiru Hope that helps. - T.J. On Dec 11, 9:59 am, youradds andy.ne...@gmail.com wrote: Hi, I'm trying to make a bit of code, which will auto-select a value from a SELECT box. Here is the example code: select style=display: inline; id=catid2 name=catid2option value=-- select --/optionoption value=136187Alberta/ optionoption value=136200British Columbia/optionoption value=136229Manitoba/optionoption value=136259Newfoundland and Labrador/optionoption value=136247New Brunswick/ optionoption value=136266Nova Scotia/optionoption value=136272Ontario/optionoption value=136303Prince Edward Island/optionoption value=136306Quebec/optionoption value=136329Saskatchewan/option/select I've tried: $('#catid2').val(136200) ..as well as: $('#catid2').val('British Columbia') ... but neither seem to work. Anyone got any suggestions? TIA! Andy
[jQuery] Re: visible divs and selectors
On second thought, I think I get it. You're doing something screwy with this: if ($(#regions div).is(:visible)) { /* ... */} It's not clear to me without checking the docs even what it means to call .is() on a group of items, but I don't think this is really what you want. Ideally, you would like to keep track of the opened item, and there is a reasonably simple way to do that: throw it into a closure like this: var chooseRegion = (function() { var current = null; return function(ej) { var newElt = $(# + ej); if (current) { current.hide(100, function(){newElt.show(600);}); } else { newElt.show(600); } current = newElt; }; })(); If you're not used to closures, the syntax may seem screwy. This shell: (function() { // ... })(); creates and immediately executes an anonymous function. That establishes a new scope in which you can store the variable current and return the actual function you want assigned to chooseRegion. That new function is straightforward, and at the end of it we set the variable current to the newly-opened div. I think that will do what you want without flicker and without having to try to close all the elements. Cheers, -- Scott
[jQuery] Collapsing
Hi, I have a menu set up with parent child links.. Best way to describe it is show an example: http://96.0.84.196/jtest/ http://96.0.84.196/jtest/ You'll notice that you can have multiple parent's open but I would like all other parents to collapse when you click another parent. So only one parent is open at a time. I know it's possible but can't get it going.. I've tried various things but can't get my head around it as I'm a bit of a jQuery noob. Any help on this would be greatly appreciated. Many thanks, Rob. -- View this message in context: http://old.nabble.com/Collapsing-tp26746905s27240p26746905.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: IE 7-8 bug on menu loading when mouse is over the menu
problem solved, the issue is with the jquery.event.hover.js... we solved by eliminating the following lines: jQuery.event.special.hover.delay = 100; jQuery.event.special.hover.speed = 100; we are using a joomla module On 11 dic, 11:40, killer chicken gamba.ferna...@gmail.com wrote: I have this issue in IE only, i've search in the forum but i didn't found nothing about that on page loading, if the mouse is over the menu IE throws an error this is what the debbugger throws in jquery.js line 25 nodeType null or non an object if(elem.nodeType==3||elem.nodeType==8 firefox works well, at least firebug doesn't show anything superfish.js and supersubs.js are loading after jquery.js any ideas will be welcome
[jQuery] Current page
How do I mark the current page in a list of links?
[jQuery] Need help with superfish dropdown menu
I'm having some difficulty finalizing my suckerfish dropdown menu on this page (ie: Resources button / link): http://www.alliedcash.com/comparison/ Here are the 3 problems that I'm trying to correct: 1) I want to eliminate the right border for each of my sublinks -- I can't seem to access / override that css property 2) When I mouseover the sublinks -- I'd like for the Resources link text to remain white (instead of turning blue) 3) In IE -- when I mouseover the sublinks -- the widths of each of teh sublinks varies on hover -- I want them to all be the same width (like the way it displays in Firefox) 4) In IE -- the left edge of the subnav list doens't line up wih the left edge of the Resources button (like the way it displays in Firefox) Any help would be appreciated. Thanks! - Yvan
[jQuery] Re: Selecting a value from a SELECT field?
Mmm weird, maybe its some of the other JS code in the page then - will see if I can debug. Thanks anyway :) On Dec 11, 4:03 pm, T.J. Simmons theimmortal...@gmail.com wrote: Have you tried putting the numeric value in quotes? It works fine like that.. here's a link so you can see. http://jsbin.com/iqiru Hope that helps. - T.J. On Dec 11, 9:59 am, youradds andy.ne...@gmail.com wrote: Hi, I'm trying to make a bit of code, which will auto-select a value from a SELECT box. Here is the example code: select style=display: inline; id=catid2 name=catid2option value=-- select --/optionoption value=136187Alberta/ optionoption value=136200British Columbia/optionoption value=136229Manitoba/optionoption value=136259Newfoundland and Labrador/optionoption value=136247New Brunswick/ optionoption value=136266Nova Scotia/optionoption value=136272Ontario/optionoption value=136303Prince Edward Island/optionoption value=136306Quebec/optionoption value=136329Saskatchewan/option/select I've tried: $('#catid2').val(136200) ..as well as: $('#catid2').val('British Columbia') ... but neither seem to work. Anyone got any suggestions? TIA! Andy
[jQuery] Re: Selecting a value from a SELECT field?
And your other syntax should also work as well: http://jsbin.com/oredo (code http://jsbin.com/oredo/edit) Must be something else on the page... -- Scott
[jQuery] Re: Need help with superfish dropdown menu
I've made some progress on resolving this issue, and all I have left to fix is the following: 2) When I mouseover the sublinks -- I'd like for the Resources link text to remain white (instead of turning blue) 4) In IE -- the left edge of the subnav list doens't line up wih the left edge of the Resources button (like the way it displays in Firefox) http://www.alliedcash.com/comparison/ Any help would be appreciated. - Yvan
[jQuery] [jQuery Tabs] Select tab from link
Good day everyone. I'm using Jquery Tabs UI and loading content via Ajax. I'm now trying to select one of the tabs from a link on another page. I'm not having any luck with the example on the jquery docs page. When I assign the #standard as an ID on the A tag it does not load the content of that tab. Example: lia href=users-standard.php id=#standardUsers/a/li Does anyone have any suggestions? Thanks!! Stephen // Jquery Stuff $(document).ready(function(){ var $tabs = $(#tabs-container).tabs(); $('#standard').click(function() { // bind click event to link $tabs.tabs('select', 2); // switch to third tab return false; }); }); // HTML Stuff div id=tabs-container ul lia href=users-admin.phpAdministrators/a/li lia href=users-standard.phpUsers/a/li lia href=users-notify.phpProcess Users/a/li lia href=users-activity.phpUser Activity/a/li lia href=db-backup.phpDatabase Backup/a/li /ul /div // Jquery Documentation http://docs.jquery.com/UI/Tabs#...select_a_tab_from_a_text_link_instead_of_clicking_a_tab_itself
[jQuery] Re: Selecting a value from a SELECT field?
Aye, must be something else on the page; I've never tried using the text of the option, good to know it works like that too. - T.J. On Dec 11, 10:27 am, Scott Sauyet scott.sau...@gmail.com wrote: And your other syntax should also work as well: http://jsbin.com/oredo(codehttp://jsbin.com/oredo/edit) Must be something else on the page... -- Scott
[jQuery] Re: Selecting a value from a SELECT field?
Hi, Ok, well kinda managed to get it working - however, I'm thinking a different approach may be needed. Let me explain a bit behind this. Basically, there are 4 SELECT boxes (catid1, catid2, catid3, catid4) . When someone selects a value from catid1, it then passes that ID to a script - and then a list of values for that category are passed back (its subcategories) ... then the same for catid3 Now, this all works absolutly fine - that is until I send them back to the page (i.e for an error, such as no title being entered or something) ... What I'm trying to do, is make some code that will automatically immitate the selecting of the boxes. The AJAX code I'm using is: jQuery.noConflict(); jQuery(function(){ jQuery(select#catid1).change(function(){ jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: jQuery(this).val()}, function(j){ jQuery('#catid2').hide(); jQuery('#catid3').hide(); jQuery('#catid4').hide(); var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } jQuery(#catid2).html(options); jQuery('#catid2 option:first').attr('selected', 'selected'); if (j.length 1) { jQuery('#catid2').show(); jQuery('#next_step_button').hide(); } }) }) }) This works fine - but when I do: jQuery(#catid4).val(%catid4%); ..it doesn't actually process it in quite the same way (the box isn't loaded) Cany anyone suggest a way of doing this? I've tried this (its part template parser synatax, and the rest is JS/ AJAX) %if catid1% jQuery(#catid1).val(%catid1%); jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: %catid1% }, function (j){ jQuery('#catid2').hide(); jQuery('#catid3').hide(); jQuery('#catid4').hide(); var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } jQuery(#catid2).html(options); jQuery('#catid2 option:first').attr('selected', 'selected'); if (j.length 1) { jQuery('#catid2').show(); jQuery('#next_step_button').hide(); } %if catid2%jQuery(#catid2).val(%catid2%);%endif% }); %endif% %if catid2% jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: %catid2% }, function (j){ jQuery('#catid3').hide(); jQuery('#catid4').hide(); var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } jQuery(#catid3).html(options); jQuery('#catid3 option:first').attr('selected', 'selected'); if (j.length 1) { jQuery('#catid3').show(); jQuery('#next_step_button').hide(); } else { jQuery('#next_step_button').show(); } %if catid3%jQuery(#catid3).val(%catid3%);%endif% }); %endif% %if catid3% jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: %catid3% }, function (j){ var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } if (j.length 1) { jQuery('#catid4').show(); alert(values exist, so show button 45); jQuery('#next_step_button').hide(); } else { jQuery('#next_step_button').show(); } %if catid4%jQuery(#catid4).val(%catid4%);%endif% }); %endif% %if catid4% jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: %catid4% }, function (j){ var options = ''; for (var i = 0; i j.length; i++) {
[jQuery] jQuery: form wizard plug-in plug-in: Validation
Hi, I’m using the Validation plug-in with Form Wizard (http:// home.aland.net/sundman/). I want to change the position of the error message from directly following the element. To explain; following each input I have a tool tip image. I would like the error message to either appear directly below the input or after the image. Is this possible? $(function(){ $(#theForm).formwizard({ //form wizard settings historyEnabled : true, formPluginEnabled: true, validationEnabled : true}, { //validation settings }, { // form plugin settings } ); });
[jQuery] Re: Selecting a value from a SELECT field?
haha think I may have worked it out :p Was missing this in the last one: jQuery(#catid3).html(options); jQuery('#catid3 option:first').attr('selected', 'selected'); On Dec 11, 4:37 pm, youradds andy.ne...@gmail.com wrote: Hi, Ok, well kinda managed to get it working - however, I'm thinking a different approach may be needed. Let me explain a bit behind this. Basically, there are 4 SELECT boxes (catid1, catid2, catid3, catid4) . When someone selects a value from catid1, it then passes that ID to a script - and then a list of values for that category are passed back (its subcategories) ... then the same for catid3 Now, this all works absolutly fine - that is until I send them back to the page (i.e for an error, such as no title being entered or something) ... What I'm trying to do, is make some code that will automatically immitate the selecting of the boxes. The AJAX code I'm using is: jQuery.noConflict(); jQuery(function(){ jQuery(select#catid1).change(function(){ jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: jQuery(this).val()}, function(j){ jQuery('#catid2').hide(); jQuery('#catid3').hide(); jQuery('#catid4').hide(); var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } jQuery(#catid2).html(options); jQuery('#catid2 option:first').attr('selected', 'selected'); if (j.length 1) { jQuery('#catid2').show(); jQuery('#next_step_button').hide(); } }) }) }) This works fine - but when I do: jQuery(#catid4).val(%catid4%); ..it doesn't actually process it in quite the same way (the box isn't loaded) Cany anyone suggest a way of doing this? I've tried this (its part template parser synatax, and the rest is JS/ AJAX) %if catid1% jQuery(#catid1).val(%catid1%); jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: %catid1% }, function (j){ jQuery('#catid2').hide(); jQuery('#catid3').hide(); jQuery('#catid4').hide(); var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } jQuery(#catid2).html(options); jQuery('#catid2 option:first').attr('selected', 'selected'); if (j.length 1) { jQuery('#catid2').show(); jQuery('#next_step_button').hide(); } %if catid2%jQuery(#catid2).val(%catid2%);%endif% }); %endif% %if catid2% jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: %catid2% }, function (j){ jQuery('#catid3').hide(); jQuery('#catid4').hide(); var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } jQuery(#catid3).html(options); jQuery('#catid3 option:first').attr('selected', 'selected'); if (j.length 1) { jQuery('#catid3').show(); jQuery('#next_step_button').hide(); } else { jQuery('#next_step_button').show(); } %if catid3%jQuery(#catid3).val(%catid3%);%endif% }); %endif% %if catid3% jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: %catid3% }, function (j){ var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } if (j.length 1) { jQuery('#catid4').show(); alert(values exist, so show button 45); jQuery('#next_step_button').hide(); } else { jQuery('#next_step_button').show();
[jQuery] Re: Collapsing
On Dec 11, 11:09 am, Dobbler dobble...@gmail.com wrote: I have a menu set up with parent child links.. Best way to describe it is show an example: http://96.0.84.196/jtest/http://96.0.84.196/jtest/ You'll notice that you can have multiple parent's open but I would like all other parents to collapse when you click another parent. So only one parent is open at a time. I know it's possible but can't get it going.. You might look at the UI Accordion: http://docs.jquery.com/UI/Accordion I'd also suggest that you find a way to do this without all the inline Javascript. That is very rarely the best solution to anything. Good luck, -- Scott
[jQuery] Re: Selecting a value from a SELECT field?
So it works now? Glad to hear. Let us know if you need anything else. - T.J. On Dec 11, 10:44 am, youradds andy.ne...@gmail.com wrote: haha think I may have worked it out :p Was missing this in the last one: jQuery(#catid3).html(options); jQuery('#catid3 option:first').attr('selected', 'selected'); On Dec 11, 4:37 pm, youradds andy.ne...@gmail.com wrote: Hi, Ok, well kinda managed to get it working - however, I'm thinking a different approach may be needed. Let me explain a bit behind this. Basically, there are 4 SELECT boxes (catid1, catid2, catid3, catid4) . When someone selects a value from catid1, it then passes that ID to a script - and then a list of values for that category are passed back (its subcategories) ... then the same for catid3 Now, this all works absolutly fine - that is until I send them back to the page (i.e for an error, such as no title being entered or something) ... What I'm trying to do, is make some code that will automatically immitate the selecting of the boxes. The AJAX code I'm using is: jQuery.noConflict(); jQuery(function(){ jQuery(select#catid1).change(function(){ jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: jQuery(this).val()}, function(j){ jQuery('#catid2').hide(); jQuery('#catid3').hide(); jQuery('#catid4').hide(); var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } jQuery(#catid2).html(options); jQuery('#catid2 option:first').attr('selected', 'selected'); if (j.length 1) { jQuery('#catid2').show(); jQuery('#next_step_button').hide(); } }) }) }) This works fine - but when I do: jQuery(#catid4).val(%catid4%); ..it doesn't actually process it in quite the same way (the box isn't loaded) Cany anyone suggest a way of doing this? I've tried this (its part template parser synatax, and the rest is JS/ AJAX) %if catid1% jQuery(#catid1).val(%catid1%); jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: %catid1% }, function (j){ jQuery('#catid2').hide(); jQuery('#catid3').hide(); jQuery('#catid4').hide(); var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } jQuery(#catid2).html(options); jQuery('#catid2 option:first').attr('selected', 'selected'); if (j.length 1) { jQuery('#catid2').show(); jQuery('#next_step_button').hide(); } %if catid2%jQuery(#catid2).val(%catid2%);%endif% }); %endif% %if catid2% jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: %catid2% }, function (j){ jQuery('#catid3').hide(); jQuery('#catid4').hide(); var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } jQuery(#catid3).html(options); jQuery('#catid3 option:first').attr('selected', 'selected'); if (j.length 1) { jQuery('#catid3').show(); jQuery('#next_step_button').hide(); } else { jQuery('#next_step_button').show(); } %if catid3%jQuery(#catid3).val(%catid3%);%endif% }); %endif% %if catid3% jQuery.getJSON(/cgi-bin/ajax_cats.cgi,{id: %catid3% }, function (j){ var options = ''; for (var i = 0; i j.length; i++) { options += 'option value=' + j[i].optionValue + '' + j [i].optionDisplay + '/option'; } if (j.length 1) { jQuery('#catid4').show();
[jQuery] Re: Document traversing with jQuery + HTML 5 drag and drop
Bump On Dec 10, 8:37 pm, eid php...@gmail.com wrote: Hello. I am coding some HTML 5 drag and drop support where the user can drag images from a library to a textarea, and the necessary HTML to include the image will then be added. The addition of the html is done through a function that takes a li element as an argument and then does the rest. The problem is that the drag and drop of any image results in the first li being sent to the function so clearly there's something wrong with my document traversing. Please take a look at the code below: The HTML can be seen here:http://hb.pastebin.com/m28f90fc8 And the relevant JavaScript is here:http://hb.pastebin.com/m1cf6fec1 If I drag 2.JPG.thumbnail.jpg to the textarea it should add the HTML for the 2.jpg but it doesn't, it adds 1.jpg - So var asset = event.parentNode; in the JS gets the wrong element. Any ideas how to fix it? Thanks
[jQuery] Sliding menu elements from under the header
So i want to make a menu which has links that (atleast seemingly) slide from under the header when hovering on their footer and retreat back up on mouseout. At first i though it was easy.. i defined menu element like this (approximately): div class=element div class=el_content /div /div
[jQuery] Re: Current page
On Dec 11, 11:14 am, Atkinson, Sarah sarah.atkin...@cookmedical.com wrote: How do I mark the current page in a list of links? $(#myList a).each(function() { if (this.href == document.location.href) $(this).addClass (currentPage); }); -- Scott
[jQuery] Sliding menu elements from under the header
So i want to make a menu which has links that (atleast seemingly) slide from under the header when hovering on their footer and retreat back up on mouseout. At first i though it was easy.. i defined menu element like this (approximately): div class=element div class=el_content Go home /div div class=el_footer /div /div with Jquery: $(document).ready(function(){ $(.element:not(.active) .el_content).hide(); $(.element:not(.active)).mouseenter(function() { $(this).children(.el_content).slideDown('fast'); }); $(.sitelink:not(.active)).mouseleave(function() { $(this).children(.el_content).slideUp(); }); }); The theory was that when the elements hide only their footer would be visible and would therefore be hanging from under the header since el_content div's height would be 0. However there is still space visible where el_content div would be visible. I also tried setting height explicitly to 0 but no effect. Thank you for any ideas
[jQuery] Problem with Jquery Superfish in IE7
Hi all, only in IE7 the submenu appear under my page's content. I use bgframe plugin. Here my code: $(ul.sf-menu).superfish({ speed: 'fast', autoArrows: false // disable generation of arrow mark-up }).find('ul').bgIframe({opacity:false}); Do you have any ideas? Thank you very much. Bye Z
[jQuery] ajax
Hi! I have a question regarding ajax. In my script i have a lot of css rules set with jquery. And when i use the .load ajax function the page gets loaded but the css rules from the script doesnt, or the script does not get loaded, so i have to refresh the page. Is there a way to get the script loaded as well without putting a link to the script in the page that is to get loaded? Or is that how you are supposed to do it? Regards George
[jQuery] Variables
Hi all! I'm adding a userCheck method to the validation plugin. It checks if the username i available, and if not an error message diplays, its done with ajax, my script does not work properly. I'm pretty new to javascript and jquery so maybe its an easy problem... its done with ajax and if the user exists i get a response with the username, if the user dont exist i get nothing back. The problem is that if i fill in the userfield with a name that doesnt exist and i change field (blur), the error message displays. And if i go back and type in the userfield the errormessage is still there until i change fields again. and it seems like the keyup event is on letter behind all the time, so if i type in an existing username i hav to type one more letter to get the error message!! Does anyone know whats going on and do i have to declare a global variable for this? var sUserResult; $.validator.addMethod('userCheck', function (value) { $.ajax({ type: POST, url: _scripts/send_message.php, data: action=checkuser user= + value, success: function(msg){ if (msg) { sUserResult = false; } else { sUserResult = true; } } }); return sUserResult; }); Many thanks in advance George
[jQuery] Using SimpleModal for Unordered List (UL)
Hi, I have configured SimpleModal for an UL to show definitions when you click on a word. The trouble is when you click on any word from the list, the correct definition is not showing, but rather the definitions shows in order from top to bottom no matter what word you click on in the list. Is there a way to configure this so it will show the correct definition for the correct word. Here is an example: Word Invite Poet Right now, even if you click on the word invite the definition for word would show up since its the first one on the list. Thanks for your help. Girlpoetus
[jQuery] document.createElement('someElement') creates SOMEELEMENT
All, I am trying to use jQuery to manage an XML document in memory to represent a back-end data store. I discovered that when I create new tags using document.createElement() instead of $(tag).clone(), it creates the new tag with the tag name in all uppercase. Now, if I am searching for the tag using jQuery selectors, all is well, until I try to do a mixed-case tag. If I create 'someElement' and then search for 'someElement', it can't find it. It created it as SOMEELEMENT but when searching the DOM for 'someElement' it won't find it. So, is this just the way it is? Should I resign myself to this limitation? Or is there another way of creating XML nodes for inclusion in an XML tree that I should be using if I want mixed-case tag names? -- John
[jQuery] Re: List item animation
Hi, You could use a recursive function to do this. Be sure to exit the function and not get stuck in a loop. Here is an example: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; head script type=text/javascript src=jquery-1.3.2.min.js/script script type=text/javascript //![CDATA[ function DoFadeIn(items,item_idx){ if(items[item_idx]==null) return; var item = items[item_idx]; $('#test').append('h2 id='+item+'style=display:none'+item +'/h2') $('#'+item).fadeIn('fast',function(){ item_idx++; DoFadeIn(items,item_idx); }); } $(document).ready(function(){ var items = new Array('one','two','three'); var item_idx = 0; DoFadeIn(items,item_idx); }); //]] /script /head body div id=test/div /body /html Ariel On Dec 11, 2:17 am, fserrano fserr...@gmail.com wrote: Hi, I'm a jQuery newbie and need someone to point me in the right direction. I want to fade in a list of items but have each item fade in when the previous item is done fading, as opposed to having them all fade in at the same time. I want to do this in groups. So let's say the list has 100 items but I only want to show 5 at a time. After 10 seconds these 5 items fade out and the next 5 load, each fading in after the previous item is entirely visible. I have done this in ActionScript, but with jQuery my main confusion is with dealing with loops after setTimeout events. In ActionScript I always got away with using the timeline to deal with time, but I don't have that luxury with JavaScript. Here's as far as I go before getting stuck: var itemsToShow = itemsToShow || 5 var current = current || 0; var itemArray = [One,Two,Three]; for( i=0+itemsToShow; i itemsToShow; i++){ $(#itemList).append(li+itemArray[i]+/li); $(li).animate({opacity: toggle}, { duration: slow }); }
[jQuery] AJAX POST listener
Hi all, I'm trying to implement a way to execute a jquery function (i created) only when an AJAX POST request has status of complete. The AJAX itself is out of my reach (controlled by the application) but I want to be able to listen to the event. If I'm not mistaken, the AJAX in jQuery mainly uses the GET method? If any one can provide any insight as to how I can have an event trigger on AJAX POST method that would be fantastic. Regards, Justin
[jQuery] checbox checked unchecked callback
I need a event listener for the checkbox check and uncheck event. Should i do that with change event or there is another simple way like . If i use the change event hw can i manage the the state of the checkbox, callback based on state. If check callback1 if uncheck callback2 I think there is an elegant way of do it. Thanks in advance
[jQuery] Re: Need to get the index of current table row
The .index() function takes some getting used to, but it does work once it's fully understood what is going on with it... the selector should be the collection of DOM objects you are looking for and the value in the index() should be one of those selected-from-the-selector DOM objects Example: http://jsbin.com/egeqe/edit some other tips in there for you too, like using the .hover event instead of all that hardwired onmouseover/out stuff :-) On Dec 11, 8:54 am, Bunn cbun...@gmail.com wrote: I am setting the rows of my grid (which outputs an HTML table) using jquery $('#gvReturnedChecks tr:odd').addClass('odd'); $('#gvReturnedChecks tr:even').addClass('even'); I am selecting a row in the grid to perform an update. I perform the update using an ajax call. I need to know the index of the node being updating. My plan is to use the expression - if (size % 2 == 0) to determine if this is an even or odd row in order to know what color to set the background to, by setting the following class: .addClass('even') or .addClass('odd') I have the object of the current table row, by transversing from the where the 'Select' link was clicked within the row. I have tried using the jquery .index() method and rowIndex to no avail - Neither are returning the index of the row in respect to it's siblings within the table Any help is appreciated - I have googled for hours on this and have been unable to find a solution. Thanks! NOTE - Below is the structure of the table row tr onmouseover=this.originalstyle=this.style.backgroundColor;this.style.backgroundColor='#99' onmouseout=this.style.backgroundColor=this.originalstyle; td align=center a id=gvReturnedChecks_ctl02_lnkDelete class=confirmDelete href=javascript:__doPostBack('gvReturnedChecks$ctl02$lnkDelete','') style=color:#0066CC;Delete/a /tdtd align=center a id=gvReturnedChecks_ctl02_lnkSelect class=select href=javascript:__doPostBack('gvReturnedChecks$ctl02$lnkSelect','') style=display:inline-block;color:#0066CC;width:50px;Select/a /tdtd span id=gvReturnedChecks_ctl02_lblReturnedID class=returnedCheckID7001/span /tdtd span id=gvReturnedChecks_ctl02_lblPlayerName class=playerNameJeffrey Clark/span /tdtd span id=gvReturnedChecks_ctl02_lblCheckNumber class=checkNumber7026844/span /tdtd span id=gvReturnedChecks_ctl02_lblDateCheckIssued class=dateCheckIssued3/2/2009/span /tdtd span id=gvReturnedChecks_ctl02_lblCheckAmount class=checkAmount3.00/ span /tdtd span id=gvReturnedChecks_ctl02_lblDateCheckReturned class=dateCheckReturned3/23/2009/span /tdtd span id=gvReturnedChecks_ctl02_lblClaimNumber class=claimNumber09030200135/span /tdtd span id=gvReturnedChecks_ctl02_lblEnteredBy class=enteredByBob/span /tdtd span id=gvReturnedChecks_ctl02_lblDateEntered class=dateEntered11/1/2009/span /td /tr
[jQuery] Submission of a form creates popin
This should be a simple matter: I'm using a plugin, prettyPopin. and I want a form to submit to it (activate it). How do I get prettyPopin to activate on form submit!
[jQuery] Help! Issue with Gridview using JQuery
I'm calling _doPostBack('UpdatePanel1', ''); in javascript and it updates my gridview after a record is inserted. The record is added from a panel above the gridview. But when I make the same call after doing an update and delete, I get the following error: Microsoft JScript runtime error: Object expected on the line where I'm calling the function. I was having issues using JQuery to keep adding records with the insert, but this worked for me. But it doesn't work for the update or delete. I would like the most simple solution, and still keep it consistent. Note: I'm using Jquery and ajax to asynchronously perform the insert, edit, and deletes. When a row is clicked in the gridview by clicking the 'Select' link, I am populating a the fields in a panel above the gridview. I'm using JQuery so that I can use the cool dialogs that come with theme I selected from themerollers. Note I am doing event.preventDefault to intercept the event and then calling it's respective web service. For example, when I select a row from the gridview by clicking 'Select' link in the gridview, the row is displayed in the panel of above and allows for an edit. When the user changes information and clicks 'Save' - I call the web service to perform the edit (I know it is an edit by storing the key selected in an hidden field) . I then update that record in the grid using JQuery. When I click 'Delete' link, I again intercept the event and show JQuery confirmation box. When the user clicks 'Yes', then I call the web service to delete the row. I then remove the row using JQuery. Is this the best way to do this?? And why can't call the doPostBack passing the UpdatePanel (which contains the gridview) for all 3 - insert AND the update and delete? Any help is greatly appreciated!
Re: [jQuery] Problem with Jquery Superfish in IE7
did you try this fix from link on superfish site? http://webdemar.com/webdesign/superfish-jquery-menu-ie-z-index-bug/ Zanfe wrote: Hi all, only in IE7 the submenu appear under my page's content. I use bgframe plugin. Here my code: $("ul.sf-menu").superfish({ speed: 'fast', autoArrows: false // disable generation of arrow mark-up }).find('ul').bgIframe({opacity:false}); Do you have any ideas? Thank you very much. Bye Z
[jQuery] proper way
My question is about syntax, or how to wite jquery code. Is the example below ok? Putting all your code between document.ready all your code with anonymous functions? $(document).ready(function() { $('a.link1').click(function() { //code }); $('a.link2').click(function() { //code }); $('form.form1').submit(function() { //code }); $('img.myPic1').css('border','solid 3px red'); }); or should i call named functions? $(document).ready(function() { $('a.link1').click(clickFunction1()); $('a.link2').click(clickFunction2()); }); function clickFunction1() { //code } function clickFunction2() { //code } I´ve heard that anonymous functions is a faster way?? thanks in advance George
[jQuery] Re: checbox checked unchecked callback
Solved On 11 Dez, 18:54, led l.r@sapo.pt wrote: I need a event listener for the checkbox check and uncheck event. Should i do that with change event or there is another simple way like . If i use the change event hw can i manage the the state of the checkbox, callback based on state. If check callback1 if uncheck callback2 I think there is an elegant way of do it. Thanks in advance
Re: [jQuery] Need help with superfish dropdown menu
2 ways to approach the color use the onBeforeSHow option withing superfish constructor to add a class to your a hovered tags, or add some li:hover a rules to change in css you have to watch for the #navlinks a:link rules you have that will superseded the superfish rules. Usually easiest to work with one css system for a menu rather than 2 as you've done, just for that reason. Yvan wrote: I'm having some difficulty finalizing my suckerfish dropdown menu on this page (ie: "Resources" button / link): http://www.alliedcash.com/comparison/ Here are the 3 problems that I'm trying to correct: 1) I want to eliminate the right border for each of my sublinks -- I can't seem to access / override that css property 2) When I mouseover the sublinks -- I'd like for the "Resources" link text to remain white (instead of turning blue) 3) In IE -- when I mouseover the sublinks -- the widths of each of teh sublinks varies on hover -- I want them to all be the same width (like the way it displays in Firefox) 4) In IE -- the left edge of the subnav list doens't line up wih the left edge of the Resources button (like the way it displays in Firefox) Any help would be appreciated. Thanks! - Yvan
Re: [jQuery] superfish - nav-bar style menu conflict with mootools
Possibly a js conflict with mooTools, have you tried jQuery noConflict? http://docs.jquery.com/Using_jQuery_with_Other_Libraries It sounds more like a css problem but without a link is hard to guess sop wrote: Hi came across a situation where i am using the nav-bar style menu in conjunction with "Slideshow 2" with mootools.(http:// www.electricprism.com/aeron/slideshow/). I noticed that the "current" style isn't behaving properly, and also rolling over to ul li for another main header, the ul li overlap each other. Appreciate your insights.
[jQuery] Re: Submission of a form creates popin
I'd also be open to trying non-plugins On Dec 11, 1:26 pm, Benn bennmey...@gmail.com wrote: This should be a simple matter: I'm using a plugin, prettyPopin. and I want a form to submit to it (activate it). How do I get prettyPopin to activate on form submit!
[jQuery] Re: Variables
Noticed that whn i do rhis synchronized it works? But that locks up the browser while the request is sent. Maybe that helps to solve the problem? I don´t understand why when i use asynchronized request, the first time the variable is undefined and then when i type for instance Joe i get back Jo and when i type Joey i get Joe. Always one letter short. Ans the same in reverse when i delete??? George
[jQuery] TreePlugin with Checkbox and some functions..
Hi, I'm a newbie in JQuery, but know JS and have allready used some JQuery- Plugins. But now I'm searching for a cool plugin which can handle the following stuff: - Tree where defined elements are folders and have no checkbox - some child elements have a checkbox, some not - I can make as much levels as I want, so no restriction - possiblity to submit these checkboxes, that I can save which ones were checked - possiblity to check some of them when loaded, because If my users come back to this page, then the allready checked checkboxes should be checked again ( it's a website were users have their own logged in area ) best would be to expand the tree then to the allready checked elements - for some of the elements I want to have a button next to the elements text, that if one has clicked this button I can then call another function e.g. with the id of this element write a text to another div I hope I didn't wrote too much and one can give me a good tip :-) cheers Charlie
[jQuery] Cluetip and Colorbox - Can I make them work together?
Hello, I'm using Cluetip to pull some AJAX content, and in that content is a link to another small bit of AJAX content. Since Cluetip doesn't seem to support multiple tips (http://groups.google.com/group/jquery-en/ browse_thread/thread/b853977ee373b1ee), I was trying to use something like Colorbox to throw up a quick modal (it has to hit the page to activate a process and then show a message), but the modal doesn't want to fire presumably because I'm trying to activate it from that original AJAX page. I'm just curious if something like this is even possible. I'm just using the basic syntax right now: $(document).ready(function() { $('a.jt').cluetip({ cluetipClass: 'jtip', dropShadow: false, hoverIntent: true, sticky: true, mouseOutClose: true, positionBy: 'fixed', leftOffset: -235, topOffset: -190 }); }); and $(document).ready(function(){ $(a.modal).colorbox(); }); It's also entirely possible that I'm not using the AJAX appropriately either, so any ideas or help would be greatly appreciated!
[jQuery] FadeOut Ajax Post FadeIn problem
Hi Folks This script fades out a div tag with id #pageArticle, gets fresh content from an anchor ajax post, and is Supposed to fade the new content in. But it won't handle from replaceWith onwards properly. New content just suddenly appears. Is there a way to get around this? I have tried opacity and hidden styles in the new div but I get an empty screen. Guess fadeIn doesn't use those values, or the style is overriding fadeIn's effect. Help!! // Substitutes the URL called from all a in menu $(#menuJ a).click(function() { var js = $(this); $(#pageArticle).fadeOut(500, function() { $.post( js.attr(href), null, function(response) { var bob = div id=\pageArticle\ + response + /div; $(#pageArticle).replaceWith(bob); $(#pageArticle).fadeIn(500); }, html); }); return false; }); Thanks in advance. New to this game.
[jQuery] switch between to img; making hover and scaling the img
I have tried making this with an hover and mouseover but it seems I am making a mistake every time, so hope somebody can help. image1 should when the mouse is over it turn into img2, img2 should then scale up. and when you remove the mouse, img2 should scale down and hide, and img1 should come back...
[jQuery] Re: jEditable, onblur and submit issue
If you bind the editable on the fly as the click occurs - Some browsers have concurrency issues. Interestingly enough a similar issue occurs with Jquery Autocomplete Plugin - but this issue is caused by the fact the author used a setTimeout() in the initialization of the plugin - I'm not sure if jeditable has any setTimeout() statements in its source but you might want to do a search. In general when a page redirects its because the browser handled an elements event in a default fashion meaning the code wasn't 'ready' or wasn't 'available' to execute - or you need to return false or stop event propagation somewhere. I know in safari if you bind a click handler to an a element and then in the body of that handler you simply return false (stopping the browser from following the anchors link) - if you click quickly enough in safari the events will que up, once the que is full or the browser is too busy the default event / action will occur, your code won't run, and the page will redirect. You might want to begin managing the event que as well using jquery - you can cancel que events when the que buffer becomes too large. I've had to implement this functionality with complex animated menus before, to make sure too many animations don't get 'stacked up'. On Dec 2, 12:06 pm, rymi...@gmail.com rymi...@gmail.com wrote: An update to my original e-mail: I have ascertained that the behaviour is exhibited only in WebKit browsers. IE and Firefox are fine, but Chrome and Safari don't work.
[jQuery] Variable and additional selectors
I'm just starting to play with jQuery and, like everyone before me, I'm amazed by it's power. In short, my question is about cloning an object, manipulating it in multiple steps and and then appending it to a list. I have an li on my page containing several divs (a user avatar and a couple lines of text). I wanted to clone that item (rather than building a whole lot of HTML in strings), change the avatar URL and some of the text then append the new object to a list. I see that I can do this: var entry = $(#userlist li).clone(); $(entry).appendTo(#userlist); However, entry has several divs that I'd like to manipulate between cloning and appending. Is there a way to use selectors to get those divs, manipulate them within entry? Entry is a jQuery so I thought I could do something like entry (.avatar)... or something but that's not right. Your guidance would be appreciated!
[jQuery] jQuery.equals How To Compare DOM Elements (quick solution)
Quickly: (function($){ jQuery.fn.equals = function(selector) { return $(this).get(0)==$(selector).get(0); }; })(jQuery); Implementation Example: ... main div id='id0'/div div id='id1'/div ul id='id2'/ul /main ... $('#id0').equals('#id1') //false $('div').equals('#id0') //true $('div:eq(1)').equals('#id1') //true $('#id0').equals('#id2') //false Explaining: Since this is almost obvious will explain if someone asks. Ask please ;)
[jQuery] Superfish - sfHover on li a href link?
Hello, I am using the great Superfish jQuery menu. The only issue I have is with the sfHover class not being attached to li when the hovered li contains a link (a tag). I guess this isn't a problem for most of the users for which the A block overflows exactly the LI but my A is contained within the LI and doesn't fully overflow it (I use some padding within the LI). On IE8 and FF, this isn't a problem, when the LI is hovered, it is recognized and the right background is applied. But on IE6, it recognizes only the A hover so only the A block has its background applied and the rest of the LI remains with the non hovered background. Checking with Firebug, I saw that the sfHover class wasn't attached to the li when there was an A into the LI. Here is my CSS code : .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active, .sf-menu li a:hover, .sf-menu li li a:hover { background:#CFDEFF; color: #fff; }
Re: [jQuery] Cluetip and Colorbox - Can I make them work together?
try using the onShow option. $('a.jt').cluetip({ cluetipClass: 'jtip', dropShadow: false, hoverIntent: true, sticky: true, mouseOutClose: true, positionBy: 'fixed', leftOffset: -235, topOffset: -190, onShow: function(ct) { ct.find(a.modal).colorbox(); } }); that might do it --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Dec 11, 2009, at 4:20 PM, necker47 wrote: Hello, I'm using Cluetip to pull some AJAX content, and in that content is a link to another small bit of AJAX content. Since Cluetip doesn't seem to support multiple tips (http://groups.google.com/group/jquery-en/ browse_thread/thread/b853977ee373b1ee), I was trying to use something like Colorbox to throw up a quick modal (it has to hit the page to activate a process and then show a message), but the modal doesn't want to fire presumably because I'm trying to activate it from that original AJAX page. I'm just curious if something like this is even possible. I'm just using the basic syntax right now: $(document).ready(function() { $('a.jt').cluetip({ cluetipClass: 'jtip', dropShadow: false, hoverIntent: true, sticky: true, mouseOutClose: true, positionBy: 'fixed', leftOffset: -235, topOffset: -190 }); }); and $(document).ready(function(){ $(a.modal).colorbox(); }); It's also entirely possible that I'm not using the AJAX appropriately either, so any ideas or help would be greatly appreciated!
Re: [jQuery] ajax
page that gets loaded doesn't include head have you tried $.getScript? or you can insert script in body of page being loaded http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback Jojje wrote: Hi! I have a question regarding ajax. In my script i have a lot of css rules set with jquery. And when i use the .load ajax function the page gets loaded but the css rules from the script doesnt, or the script does not get loaded, so i have to refresh the page. Is there a way to get the script loaded as well without putting a link to the script in the page that is to get loaded? Or is that how you are supposed to do it? Regards George
Re: [jQuery] detecting edge cases when swapping divs
next() is a sibling selector. Since it is contained within content div it will only interact with elements within content testing for length is a very handy method. if( $(this).next().length==0) { // will return true if at bottom, would have to test after the animation, or use length==1 if test before animation // $("yourDownArrow").hide() } Abbey wrote: Hello, I have basic js knowledge, and just started playing with jQuery. I am doing an experiment where when you click an UP/DOWN ARROW link, the box will slide up/down throughout the page. I found a generic swap function online and modified it for jQuery use. Now I want to refine it more. I'd like to: 1) When the box is under the HEADER make the UP ARROW disappear, because we don't want this box to go farther than that. 2) Same when the box is above the FOOTER, make the DOWN ARROW disappear so it won't go down anymore on the page. Here is my test page: http://bit.ly/7uN0ly The jQuery code is at the bottom if you view the source. Additional Notes: I know I can make the ARROW disappear if I add $(this).css ("visibility","hidden"); How come I can't do $(this).parents().prev("div").is("#footer") to detect the footer div? The header will always be the first div inside the body, the footer will always be the last div inside the body. Thanks for any help! I'm just stuck trying to detect these edge divs. ~Abbey
Re: [jQuery] AJAX POST listener
when in doubt the jQuery docs are your best friend copy/paste straight from Ajax examples: $.ajax({ type: "POST", url: "some.php", data: "name=Johnlocation=Boston", success: function(msg){ alert( "Data Saved: " + msg ); } }); success callbacks fire when return data is received, do whatever you need to do within the success callback http://docs.jquery.com/Ajax/jQuery.ajax#options Justin wrote: Hi all, I'm trying to implement a way to execute a jquery function (i created) only when an AJAX POST request has status of complete. The AJAX itself is out of my reach (controlled by the application) but I want to be able to listen to the event. If I'm not mistaken, the AJAX in jQuery mainly uses the GET method? If any one can provide any insight as to how I can have an event trigger on AJAX POST method that would be fantastic. Regards, Justin
[jQuery] Re: ajax
Thanks, getScript worked :D, appreciate it!!! Now i got another problem :s i´m using special characters åäö cause its a swedish site, iso 8859-1, and when the script loads it doesnt get properly encoded so i cant see those characers.( Im setting textfields with example text ) Is there a way to encode it? George On 12 Dec, 03:25, Charlie charlie...@gmail.com wrote: page that gets loaded doesn't include head have you tried $.getScript? or you can insert script in body of page being loadedhttp://docs.jquery.com/Ajax/jQuery.getScript#urlcallback Jojje wrote:Hi! I have a question regarding ajax. In my script i have a lot of css rules set with jquery. And when i use the .load ajax function the page gets loaded but the css rules from the script doesnt, or the script does not get loaded, so i have to refresh the page. Is there a way to get the script loaded as well without putting a link to the script in the page that is to get loaded? Or is that how you are supposed to do it? Regards George
Re: [jQuery] proper way
Just put the calls to the functions that do the work inside of .ready(). Put everything else outside of it. As for anonymous functions, they are good for creating a context that avoids polluting your name space. When the function ends, everything defined within disappears into oblivion unless there is some reference to it from the outside. So, you need to create variables or objects outside, if you want to be able to keep them around. Or, you need to bind the things that are inside the closure to events on objects (such as the DOM) that are outside. On Fri, Dec 11, 2009 at 2:02 PM, Jojje jojjsus_chr...@hotmail.com wrote: My question is about syntax, or how to wite jquery code. Is the example below ok? Putting all your code between document.ready all your code with anonymous functions? $(document).ready(function() { $('a.link1').click(function() { //code }); $('a.link2').click(function() { //code }); $('form.form1').submit(function() { //code }); $('img.myPic1').css('border','solid 3px red'); }); or should i call named functions? $(document).ready(function() { $('a.link1').click(clickFunction1()); $('a.link2').click(clickFunction2()); }); function clickFunction1() { //code } function clickFunction2() { //code } I´ve heard that anonymous functions is a faster way?? thanks in advance George -- John Arrowwood John (at) Irie (dash) Inc (dot) com John (at) Arrowwood Photography (dot) com John (at) Hanlons Razor (dot) com -- http://arrowwood.blogspot.com Mike Ditka http://www.brainyquote.com/quotes/authors/m/mike_ditka.html - If God had wanted man to play soccer, he wouldn't have given us arms.
Re: [jQuery] Variable and additional selectors
var entry = $('#userlist li).clone(); $('stuff',entry)... | $(entry).find('stuff')... $(entry).appendTo('#userlist') On Fri, Dec 11, 2009 at 1:46 PM, Adomatic adobi...@gmail.com wrote: I'm just starting to play with jQuery and, like everyone before me, I'm amazed by it's power. In short, my question is about cloning an object, manipulating it in multiple steps and and then appending it to a list. I have an li on my page containing several divs (a user avatar and a couple lines of text). I wanted to clone that item (rather than building a whole lot of HTML in strings), change the avatar URL and some of the text then append the new object to a list. I see that I can do this: var entry = $(#userlist li).clone(); $(entry).appendTo(#userlist); However, entry has several divs that I'd like to manipulate between cloning and appending. Is there a way to use selectors to get those divs, manipulate them within entry? Entry is a jQuery so I thought I could do something like entry (.avatar)... or something but that's not right. Your guidance would be appreciated! -- John Arrowwood John (at) Irie (dash) Inc (dot) com John (at) Arrowwood Photography (dot) com John (at) Hanlons Razor (dot) com -- http://arrowwood.blogspot.com Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html - Computers are useless. They can only give you answers.
Re: [jQuery] Random problems with load()?????
The NET tab doesn't return anything... It doesn't work, or it works only sometimes, for aparently no reason. --- On Wed, 12/9/09, Juan Ignacio Borda juanignaciobo...@gmail.com wrote: From: Juan Ignacio Borda juanignaciobo...@gmail.com Subject: Re: [jQuery] Random problems with load()? To: jquery-en@googlegroups.com Date: Wednesday, December 9, 2009, 12:48 PM try using firebug for firefox and look at the NET tab for response of the server. Original Message Hello everyone! I'm using load() to get some php content in ti a div, the PHP has a long switch() conditional that brings back contents depending on var received, it works fine, almost all the time... Sometimes, the load function doesn't load anything, there's a callback function for the load event, and it fires correctly, but nothing get loaded. It is not a PHP problem cause if I pass the var via URL to the PHP document it works, even further, the same request sometimes works, sometimes not... Is this common? Can I get any error report from the load() function?