[jQuery] Re: IE6/IE7 Error (Object doesn't support this property or method)
Check this Link U'll knw the Problem that i'm talking about. http://aspspider.info/KhanZeeshan/ Check it IE6 IE7 i chekced it in IE8,FF 3.0 Chorme safari ti works gr8 in All browsers xcpt IE6 IE7. On Thu, Apr 23, 2009 at 8:47 AM, Zeeshan Khan khan.zeesha...@gmail.comwrote: i validated my html Javascript as well...but there was no error..i don't know any free asp.net web hosting site...if u know any please let me know i'll upload my site there..then u guys can check it thoroughly.. On Wed, Apr 22, 2009 at 6:02 PM, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: Fact is that the error is quite generic. I think I've even gotten it for forgetting to use a ; at the end of a line. Jonathan MorningZ wrote: What do you mean by VALIDATE? http://www.google.com/search?q=html+validation As for your IE error, usually that means that the type of object isn't what your code is expecting. but as Jonathan points out, it's hard to help more than that without seeing the code fail On Apr 22, 6:10 am, KhanZeeshan khan.zeesha...@gmail.com wrote: What do you mean by VALIDATE?Give me your EMail ID i'll mail you the whole code. On Apr 22, 2:59 pm, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: It seems like your code depends on some modules other than jquery itself, and i don't think all the relevant code is in there. I think it would still be better to post a link to the page you made, or even better, reduce it to a test case that shows the problem. Does your html validate at least? Jonathan KhanZeeshan wrote: -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Infinite Recall Over a Fixed Interval
I often find that sometimes $(this).html will work. Date: Wed, 22 Apr 2009 19:49:13 -0700 Subject: [jQuery] Re: Infinite Recall Over a Fixed Interval From: kiu...@mac.com To: jquery-en@googlegroups.com On Apr 22, 5:29 pm, James james.gp@gmail.com wrote: Something like the below? (function($) { $.fn.JSClock = function() { setInterval(function() { // code to get and write time here }, 1000); } })(jQuery); In and of themselves the above and the following both fail. My guess is that this.html() object is not a proper reference. I say this, because the code JSClock() does not interfere with the rest of my jQuery methods when placed inside the $.ready( ) method. (function($) { $.fn.JSClock = function() { function timeFormat(i) { if (i 10) { i=0 + i; } return i; } setInterval(function() { var today=new Date(); var h=today.getHours(); var m=today.getMinutes(); var s=today.getSeconds(); m=timeFormat(m); s=timeFormat(s); this.html(Local Time: + h +:+ m +:+s); },500); } })(jQuery); $(document).ready(function() { $('#flowers').writeColorOfFlower(); $('#today').toDate(); $('#clock').JSClock(); }); _ View your Twitter and Flickr updates from one place – Learn more! http://clk.atdmt.com/UKM/go/137984870/direct/01/
[jQuery] Re: 'Simulating' mouseenter/mouseleave/hover events using $.live
Hello, I made some changes to the script: (function($){ var contains = document.compareDocumentPosition ? function(a, b){ return a.compareDocumentPosition(b) 16; } : function(a, b){ return a !== b (a.contains ? a.contains(b) : true); }, oldLive = $.fn.live, oldDie = $.fn.die; function createEnterLeaveFn(fn, type){ return jQuery.event.proxy(fn, function(e) { if( this !== e.relatedTarget !contains(this, e.relatedTarget) ) { e.type = type; fn.apply(this, arguments); } }); } function createBubbleFn(fn, type){ return jQuery.event.proxy(fn, function(e) { var parent = this.parentNode; fn.apply(this, arguments); if( parent ){ e.type = type; $(parent).trigger(e); } }); } var enterLeaveTypes = { mouseenter: 'mouseover', mouseleave: 'mouseout' }; $.fn.live = function(types, fn, bubble){ var that = this; $.each(types.split(' '), function(i, type){ var proxy = fn; if(bubble){ proxy = createBubbleFn(proxy, enterLeaveTypes[type] || type); } if(enterLeaveTypes[type]){ proxy = createEnterLeaveFn(proxy, type); type = enterLeaveTypes[type]; } oldLive.call(that, type, proxy); }); }; $.fn.die = function(type, fn){ if(/mouseenter|mouseleave/.test(t.type)){ if(type == 'mouseenter'){ type = 'mouseover'; } else { type = 'mouseout'; } } oldDie.call(this, type, fn); }; })(jQuery); Now You can enable bubbling, too. Example: var add = function(){ $(this).addClass('over'); }, remove = function(){ $(this).removeClass('over'); } ; $('ul.nav').each(function(){ //no bubble $(' li', this) .live('mouseenter', add) .live('mouseleave', remove); //bubbles $('li li', this) .live('mouseenter', add, true) .live('mouseleave', remove, true); }); regards alex On 20 Apr., 16:23, Walther waltherl...@gmail.com wrote: Thank you! I'll have a go when I get home later today and let you know how it works out. At the very least you've given me a very big starting block, and perhaps this will end up in the jQuery core! On Apr 18, 2:34 am, alexander farkas i...@corrupt-system.de wrote: You can try the following code for this (only testet with firefox). (function($){ var contains = document.compareDocumentPosition ? function(a, b){ return a.compareDocumentPosition(b) 16; } : function(a, b){ return a !== b (a.contains ? a.contains(b) : true); }, oldLive = $.fn.live, oldDie = $.fn.die; function createEnterOutFn(fn){ return jQuery.event.proxy(fn, function(e) { if( contains(e.relatedTarget, this) ){ e.type = (e.type == 'mouseover') ? 'mouseenter' : 'mouseleave'; //console.log('e') fn.apply(this, arguments); } }); } $.fn.live = function(type, fn){ if(/mouseenter|mouseleave/.test(type)){ console.log('d') fn = createEnterOutFn(fn); if(type == 'mouseenter'){ type = 'mouseover'; } else { type = 'mouseout'; } } oldLive.call(this, type, fn); }; $.fn.die = function(type, fn){ if(/mouseenter|mouseleave/.test(t.type)){ if(type == 'mouseenter'){ type = 'mouseover'; } else { type = 'mouseout'; }
[jQuery] jquery lightbox - ie height problem
Hi, i'm using jquery lightbox, but when i open an image from ie, lightbox background' s height doesn't cover all website. Take a look here http://www.mcworks.it/tests/index.php?page=oil-jeans I tried using z-index or changhing height, but problem persist. Thank you Paolo
[jQuery] Re: IE6/IE7 Error (Object doesn't support this property or method)
That is pretty weird, especially since the error happens on a line that doesn't exist. The IE js debugger proved useless too. It also loads the wrong page. As far as i can tell (using Fiddler), the code tries to load Page1.aspx , but instead of putting that in the tab, it embeds the whole current page (including all the javascript files, which get loaded again and are probably the cause of the error you get). If you can manage to figure out why it embeds the current page instead of the page you want, you'll have solved your problem. Jonathan Zeeshan Khan wrote: Check this Link U'll knw the Problem that i'm talking about. http://aspspider.info/KhanZeeshan/ Check it IE6 IE7 i chekced it in IE8,FF 3.0 Chorme safari ti works gr8 in All browsers xcpt IE6 IE7. On Thu, Apr 23, 2009 at 8:47 AM, Zeeshan Khan khan.zeesha...@gmail.com mailto:khan.zeesha...@gmail.com wrote: i validated my html Javascript as well...but there was no error..i don't know any free asp.net http://asp.net web hosting site...if u know any please let me know i'll upload my site there..then u guys can check it thoroughly.. On Wed, Apr 22, 2009 at 6:02 PM, Jonathan Vanherpe (T T NV) jonat...@tnt.be mailto:jonat...@tnt.be wrote: Fact is that the error is quite generic. I think I've even gotten it for forgetting to use a ; at the end of a line. Jonathan MorningZ wrote: -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be mailto:jonat...@tnt.be -- www.tnt.be http://www.tnt.be/?source=emailsig *Jonathan Vanherpe* jonat...@tnt.be mailto:jonat...@tnt.be - www.tnt.be http://www.tnt.be/?source=emailsig - tel.: +32 (0)9 3860441
[jQuery] Re: Accordion : remote objects
It's not exactly multiple instances, because it's the same accordion, but elements that should be opened/closed are not contiguous. I think maybe i shouldn't use accordion, but have to find how to do.. On 22 avr, 19:41, Natkeeran L.K. natkee...@gmail.com wrote: Perhaps, I mis understood your request. The way you showed is multiple instances of accordion. --- some content --- can be anything. Thats possible I suppose. Regards, Nat On Apr 22, 12:21 pm, okpoube...@gmail.com djibm...@gmail.com wrote: Hello everyone (pls excuse my english...) I'm trying to add an accordion to a page. But i can see that the correct structure is something like this: div id=accord h3item1/h3 pcontent1/p h3item2/h3 pcontent3/p /div i.e., elements must be contiguous. Is it possible to have something like that: div class=accord h3item1/h3 pcontent1/p /div --- some content --- div class=accord h3item2/h3 pcontent2/p /div Or maybe i shall try with the solution described here :http://docs.jquery.com/UI/Accordion#NOTE:_If_you_want_multiple_sectio... and tying to close all other instances... Thanks
[jQuery] Re: 'Simulating' mouseenter/mouseleave/hover events using $.live
I would have thought you could do it with $('.selector').live ('mousrover', myMouseOverFunc).live ('mouseout', myMouseOutFunc); On Apr 11, 8:36 pm, Walther waltherl...@gmail.com wrote: I am looking for a way to simulate the actions of the hover (or mouseenter/mouseleave) whilst using the live method of binding (The items are dynamic). Is there a way to do this or will I need to use the 'old fashioned' method of unbinding and rebinding? I do not want to use a plugin.
[jQuery] Re: Alternate $.load
This isn't entirely correct, and not quite what I had. For example I have a lots of divs in temp.php (after work with DB). And in the end of $.ajax I have msg. How I can manipulate with this and find divs and p and so on ? On 23 апр, 05:08, Shane Riley shanerileydoti...@gmail.com wrote: Typically you'd only echo the data back that you want instead of having to weed through a string of HTML data to extract what you need. From what it looks like, you're needing a specific element from another page while still being able to access the other page (temp.php) in its entirety. The easiest solution in this case would be to send some data to temp.php letting it know that you're initializing an asynchronous request, and then have the PHP return only what you're looking for. A quick solution in this case would be something like this: $.ajax({url: 'temp.php', data: ajax=true, cache: false, error: function(msg) {alert(Error Saved: + msg);}, success: function(msg) {alert(Data Saved: + msg);}, complete: function() {$.unblockUI();} }); Then in temp.php, check for this flag, and if it's true, send the header2 div only. ?php $header2 = 'div id=header2pSome text in header2 .../p/div'; if ($_GET[ajax]) { ? !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleTest file/title meta http-equiv=Content-Type content=text/html; charset=windows-1251 /head body div id=headerpSome text in div header/p/div ? $id = isset($_GET[ID]) ? $_GET[ID] : ; $number = isset($_GET[NUMBER]) ? $_GET[LOT_NUMBER] : ; echo pbid =/b . $id . /p; echo pnumber = . $number . /p; echo $header2; ? /body /html ?php } else { echo $header2; } ? However ideally you'd use a separate PHP function or file altogether to handle it. On Apr 22, 8:21 pm, Colonel tcolo...@gmail.com wrote: I know it. But how I can get content from remote file by $.ajax? For example I have some file temp.php: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleTest file/title meta http-equiv=Content-Type content=text/html; charset=windows-1251 /head body div id=headerpSome text in div header/p/div ? $id = isset($_GET[ID]) ? $_GET[ID] : ; $number = isset($_GET[NUMBER]) ? $_GET[LOT_NUMBER] : ; echo pbid =/b . $id . /p; echo pnumber = . $number . /p; ? div id=header2pSome text in header2 .../p/div /body /html and Am using $.ajax: $.ajax({url: 'temp.php', cache: false, error: function(msg) {alert(Error Saved: + msg);}, success: function(msg) {alert(Data Saved: + msg);}, complete: function() {$.unblockUI();} }); how I can get for example content only from div with id=header2 ? On 23 апр, 01:55, Shane Riley shanerileydoti...@gmail.com wrote: You can use a number of Ajax functions built in to JQuery depending on your specific needs. Check them out athttp://docs.jquery.com/Ajax. If all you're looking to do is insert one file into another, load is normally the way to go, unless you're looking to place the loaded file before, after, or in between elements rather than inside a placeholder element. On Apr 22, 5:50 pm, Colonel tcolo...@gmail.com wrote: Is there another way load HTML from a remote file and inject it into the DOM (instead of $.load)?
[jQuery] Re: Dialog (jQuery UI Dialog) closes when i cancel a form submission
anyone On Apr 22, 3:38 pm, iceangel89 iceange...@gmail.com wrote: i have a form inside dialogs. i use ajaxForm plugin for my forms. i validate using beforeSubmit ... like in the example below. the strange thing is the dialog closes in the Add/Edit Type forms but not in the Add/Edit Category. the form did not submit which means the return false works but the dialog containing the form closes. why is this so? $(#frmAddType).ajaxForm({ dataType: json, beforeSubmit: function() { if ($(#atName).val() == ) { alert(Please enter a type); return false; } }, success: postAddType, resetForm: true}); $(#frmEditType).ajaxForm({ dataType: json, beforeSubmit: function() { if ($(#etName).val() == ) { alert(Please enter a type); return false; } }, success: postEditType, resetForm: true}); $(#frmAddCategory).ajaxForm({ dataType: json, beforeSubmit: function() { if ($(#acName).val() == ) { alert(Please enter a category); return false; } }, success: postAddCategory, resetForm: true}); $(#frmEditCategory).ajaxForm({ dataType: json, beforeSubmit: function() { if ($(#ecName).val() == ) { alert(Please enter a category); return false; } }, success: postEditCategory, resetForm: true }); });
[jQuery] Re: jQuery Ajax Error in Firefox 3.0.8
Sorry Guys I got the solution by adding data:{}, after the dataType:... On Apr 23, 9:31 am, Geo.. g...@netbios.in wrote: I got the error on Error Stage that means the post is not working The problem is not in all servers for test purposes i just echo a hello world in ajax.php On Apr 22, 10:38 pm, Josh Powell seas...@gmail.com wrote: what does ajax.php return? at what stage is the error, beforesend, error, success, complete? Put in a console.log and see if it is executed in each of the states. Just a style suggest, but reverse your usage of quotes: $('#searchresult').html('div align=center valign=middle style:height:300px;position:fixed;img src=loading.gif / nbsp;nbsp;img src=text.gif //div'); instead of $('#searchresult').html(div align='center' valign='middle' style:'height:300px;position:fixed;'img src='loading.gif' / nbsp;nbsp;img src='text.gif' //div); On Apr 22, 6:34 am, Geo.. g...@netbios.in wrote: Hi friends I tried to develop an ajax request using jQuery It works fine with IE and Even Chrome But I always getting same error in firefox 411 Length Required On firebug error shows on jquery.js line no 19 my code is given below $.ajax({ type:'POST', url:'ajax.php', dataType:html, cache:false, timeout:1, beforeSend:function(){ $('#searchresult').html(div align='center' valign='middle' style:'height:300px;position:fixed;'img src='loading.gif' /nbsp;nbsp;img src='text.gif' //div); }, error:function(){ $('#searchresult').text(Server Not Responding ,Try again ).show ().fadeOut(2000); }, success:function(data){ $('#searchresult').html(data); } }); Is there any common error with jquery + firefox + ajax I tried versions of jquery 1.2.6 and 1.3.2 expecting your help Geo ..
[jQuery] Need help with menu programming
hi, my menu looks like this: div id=menu ul class=m_home{if !$smarty.get.l}active_main{/if} lidiva href=/home/a/div/li /ul ul class=m_company lidivDCT/div ul {if $smarty.get.l == 2}class=active_sub{/if} lia href=/?l=2amp;p=wir-ueber-unswir über uns/ a/li lia href=/?l=2amp;p=philosophiephilosophie/a/ li lia href=/?l=2amp;p=teamteam/a/li /ul /li /ul ul class=m_kompetenzen lidivkompetenzen/div ul lia href=/?l=2amp;p=beratung- projektierungBeratung / Projektierung/a/li lia href=/? l=2amp;p=softwareentwicklungSoftwareentwicklung/a/li lia href=/?l=2amp;p=webWebdesign / Homepage/a/ li lia href=/? l=2amp;p=netzwerkwartungNetzwerkwartung/a/li lia href=/? l=2amp;p=netzwerkadministrationNetzwerkadministration/a/li lia href=/?l=2amp;p=qualitaet-workflowQualität / Workflow/a/ li /ul /li /ul /div
[jQuery] Need help with menu programming
hi, my menu looks like this: div id=menu ul class=m_home{if !$smarty.get.l}active_main{/if} lidiva href=/home/a/div/li /ul ul class=m_company lidivDCT/div ul {if $smarty.get.l == 2}class=active_sub{/if} lia href=/?l=2amp;p=wir-ueber-unswir über uns/ a/li lia href=/?l=2amp;p=philosophiephilosophie/a/ li lia href=/?l=2amp;p=teamteam/a/li /ul /li /ul ul class=m_kompetenzen lidivkompetenzen/div ul lia href=/?l=2amp;p=beratung- projektierungBeratung / Projektierung/a/li lia href=/? l=2amp;p=softwareentwicklungSoftwareentwicklung/a/li lia href=/?l=2amp;p=webWebdesign / Homepage/a/ li lia href=/? l=2amp;p=netzwerkwartungNetzwerkwartung/a/li lia href=/? l=2amp;p=netzwerkadministrationNetzwerkadministration/a/li lia href=/?l=2amp;p=qualitaet-workflowQualität / Workflow/a/ li /ul /li /ul /div
[jQuery] Re: jQuery + Firefox - Potential bug with hover event?
I haven't tried that yet. I have tried it with the jQuery mouseleave and mouseenter events and same problem occurs. On Apr 23, 2:03 am, Dave Methvin dave.meth...@gmail.com wrote: Happens here as well. Does it happen with bare DOM functions too?
[jQuery] Re: Alternate $.load
It would be much easier to generate a json response instead of html and use .getJSON and then the DOM insertion functions to generate the html you need on the page. On Apr 23, 1:41 am, Colonel tcolo...@gmail.com wrote: This isn't entirely correct, and not quite what I had. For example I have a lots of divs in temp.php (after work with DB). And in the end of $.ajax I have msg. How I can manipulate with this and find divs and p and so on ? On 23 апр, 05:08, Shane Riley shanerileydoti...@gmail.com wrote: Typically you'd only echo the data back that you want instead of having to weed through a string of HTML data to extract what you need. From what it looks like, you're needing a specific element from another page while still being able to access the other page (temp.php) in its entirety. The easiest solution in this case would be to send some data to temp.php letting it know that you're initializing an asynchronous request, and then have the PHP return only what you're looking for. A quick solution in this case would be something like this: $.ajax({url: 'temp.php', data: ajax=true, cache: false, error: function(msg) {alert(Error Saved: + msg);}, success: function(msg) {alert(Data Saved: + msg);}, complete: function() {$.unblockUI();} }); Then in temp.php, check for this flag, and if it's true, send the header2 div only. ?php $header2 = 'div id=header2pSome text in header2 .../p/div'; if ($_GET[ajax]) { ? !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleTest file/title meta http-equiv=Content-Type content=text/html; charset=windows-1251 /head body div id=headerpSome text in div header/p/div ? $id = isset($_GET[ID]) ? $_GET[ID] : ; $number = isset($_GET[NUMBER]) ? $_GET[LOT_NUMBER] : ; echo pbid =/b . $id . /p; echo pnumber = . $number . /p; echo $header2; ? /body /html ?php } else { echo $header2; } ? However ideally you'd use a separate PHP function or file altogether to handle it. On Apr 22, 8:21 pm, Colonel tcolo...@gmail.com wrote: I know it. But how I can get content from remote file by $.ajax? For example I have some file temp.php: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleTest file/title meta http-equiv=Content-Type content=text/html; charset=windows-1251 /head body div id=headerpSome text in div header/p/div ? $id = isset($_GET[ID]) ? $_GET[ID] : ; $number = isset($_GET[NUMBER]) ? $_GET[LOT_NUMBER] : ; echo pbid =/b . $id . /p; echo pnumber = . $number . /p; ? div id=header2pSome text in header2 .../p/div /body /html and Am using $.ajax: $.ajax({url: 'temp.php', cache: false, error: function(msg) {alert(Error Saved: + msg);}, success: function(msg) {alert(Data Saved: + msg);}, complete: function() {$.unblockUI();} }); how I can get for example content only from div with id=header2 ? On 23 апр, 01:55, Shane Riley shanerileydoti...@gmail.com wrote: You can use a number of Ajax functions built in to JQuery depending on your specific needs. Check them out athttp://docs.jquery.com/Ajax. If all you're looking to do is insert one file into another, load is normally the way to go, unless you're looking to place the loaded file before, after, or in between elements rather than inside a placeholder element. On Apr 22, 5:50 pm, Colonel tcolo...@gmail.com wrote: Is there another way load HTML from a remote file and inject it into the DOM (instead of $.load)?
[jQuery] Re: jquery lightbox - ie height problem
if u mean the gray background u get when u click the image...it working fine in all the four browsers i tried IE7,FF 3.0,Chrome safari..if this is not ur problm then cud u give more detail.. Regards; Zeeshan Ahmed Khan On Thu, Apr 23, 2009 at 1:17 PM, Titti prima...@gmail.com wrote: Hi, i'm using jquery lightbox, but when i open an image from ie, lightbox background' s height doesn't cover all website. Take a look here http://www.mcworks.it/tests/index.php?page=oil-jeans I tried using z-index or changhing height, but problem persist. Thank you Paolo
[jQuery] Re: load json
To overcome this problem I've used .live() $(.delete).live(click,function(){ ... }); Thanks again!
[jQuery] Jquer.live and facebox
I have used the facebox plugin with a simple a rel=facebox href=#2121/a in the head i have set jQuery(document).ready(function($) { $(\'a[rel*=facebox]\').facebox({ faceboxHtml: \'div id=facebox style=display:none; \ div class=popup \ table \ tbody \ tr \ td class=tl/td class=b/td class=tr/ \ /tr \ tr \ td class=b/ \ td class=body \ div class=content \ /div \ div class=footer \ /a \ /div \ /td \ td class=b/ \ /tr \ tr \ td class=bl/td class=b/td class=br/ \ /tr \ /tbody \ /table \ /div \ /div\', }) }) If i call an ajax function and recreate the a rel=facebox href=#210210/a obvious the link don't work. It is neccesary the live query plugin,... but i have not event to bind the live query plugin. I have try with jQuery(document).ready(function($) { $(\'a[rel*=facebox]\').livequery(\'click\', function(event) { $(\'a[rel*=facebox]\').facebox({ faceboxHtml: \'div id=facebox style=display:none; \ div class=popup \ table \ tbody \ tr \ td class=tl/td class=b/td class=tr/ \ /tr \ tr \ td class=b/ \ td class=body \ div class=content \ /div \ div class=footer \ /a \ /div \ /td \ td class=b/ \ /tr \ tr \ td class=bl/td class=b/td class=br/ \ /tr \ /tbody \ /table \ /div \ /div\', }) }); }); but the code is
[jQuery] Re: finding mouse position within a div with a scrollbar
Here's an excerpt from my click event that determines the mouse coordinates for a click regardless of horizontal / vertical scrolling of the page or the clicked image: $('#img1').live('click', function(e) { var locX = Math.round(e.pageX - $(this).offset().left); var locY = Math.round(e.pageY - $(this).offset().top); ... On Apr 22, 9:59 am, Charlie Park char...@pearbudget.com wrote: I have a div with an overflow, so it has a scrollbar. The what are my mouse's coordinates tutorials (like this one:http://docs.jquery.com/Tutorials:Mouse_Position) only yield A) the coordinates of the mouse on the page (using e.pageX and e.pageY, or B) the absolute coordinates of the mouse, within the element, on the page (using e.pageX - this.offsetLeft;). What I want to do is to find out how far down, *within my scrolling element*, the mouse is. Best way to think of it: picture a calendar, like on Google Calendar. It has a scrollbar, so 10:00 am might be the earliest-visible timeslot (the mouse position would be at 0, 0 if it were in the top-left corner. But within div#calendar, you could have 599 pixels hiding above the visible section. That is, the mouse is actually at point 0, 600. How can I determine how much of the div is hiding? Alternately, how can I determine what the mouse's coordinates are, considering the entire height of the div, and not just the visible portion of it?
[jQuery] Re: 'Simulating' mouseenter/mouseleave/hover events using $.live
@Gordon mouseover and mouseenter is not the same. mouseover bubbles mouseenter not. This means with mouseover/mouseout your handler will be called everytime you mouseover/mouseout a descendant element. With mouseenter your eventhandler is pnly called, if the mouse enters your element. This is the problem, why you need to handle this special with live- event. To get this work you have to use mouseover to simulate mouseenter... regards alex btw: using mouseenter/mouseover/mouseleave/mouseout-events with live can add a lot overhead to your app. I don´t think, that you should use this unthought. But it will make much sense with the upcomming feature to bind the listener to another context than document in jquery 1.3.3. On 23 Apr., 10:24, Gordon grj.mc...@googlemail.com wrote: I would have thought you could do it with $('.selector').live ('mousrover', myMouseOverFunc).live ('mouseout', myMouseOutFunc); On Apr 11, 8:36 pm, Walther waltherl...@gmail.com wrote: I am looking for a way to simulate the actions of the hover (or mouseenter/mouseleave) whilst using the live method of binding (The items are dynamic). Is there a way to do this or will I need to use the 'old fashioned' method of unbinding and rebinding? I do not want to use a plugin.
[jQuery] Re: 'Simulating' mouseenter/mouseleave/hover events using $.live
Hello, i forgot to return the jQuery-object in my live-/die- replacement. So please add ' return this; ' to the last line of each-methods. regards alex
[jQuery] JQuery UI Accordion option collapsible:true not collapsing
I have a simple Accordion which I have given the settings: $(#accordion).accordion({ event: mouseover, header: h3, active: false, collapsible: true, autoHeight: true }); And has layout: div id=accordion h3 class=featured-pic-container111/h3 div pAAA/p /div h3 class=featured-pic-container222/h3 div pBBB/p /div h3 class=featured-pic-container333/h3 div pCCC/p /div /div I would like the whole accordion to collapse upon mouseout, but collapsible:true doesn't seem to do this. Any suggestions? Many thanks, Nico
[jQuery] Re: Background color is being applied when using Cycle plugin
In case anyone was wondering why, here's the solution from Mike Alsup. Hope it helps anyone else with the issue. Hi Shane, There are two cleartype options in Cycle, and unfortunately one of them is not documented (yet). The general purpose of the cleartype logic in Cycle is to workaround a rendering issue in IE when cleartype is enabled on the system. When a Windows machine has cleartype enabled, IE6/7 render text aliased when there is an opacity filter applied to an element. In IE6, the effects of this can be greatly minimized if the element in question has an explicit background color. When Cycle's 'cleartype' option is true the plugin will attempt to set a background color on all of the slides to provided better antialiasing support on IE6. To determine the best bg color, the plugin walks up the parent hierarchy until it finds a parent with a non-transparent background color. If it doesn't find one then it uses white. In addition, when the cleartype option is true the plugin will always try to remove the opacity filter after the transition completes, this fixes the aliased text on IE7. Since Cycle is used in many, many different environments I realized that there are some cases in which setting a specific background color is not desirable. A long time ago I added an option called 'cleartypeNoBg'. When this option is true Cycle will *not* set a background color on the slide elements (but it will still remove the opacity filter after each slide transition). In Internet Explorer the default value of Cycle's 'cleartype' option is true in recent versions of the plugin. So to use the undocumented option you would do this: $('#slideshow').cycle({ cleartypeNoBg: true }); Hope this helps with the problem you're having. Mike On Apr 22, 6:00 pm, Shane Riley shanerileydoti...@gmail.com wrote: I've been using Mike Alsup's Cycle plugin on a large number of projects, and one of the most recent ones is giving me trouble in IE. In this example, the slide container seems to have a background color applied to it, and there is neither a background property added to it nor is there any background property in the CSS for the slide element or its children. I finally decided to recreate the effect from scratch to make sure it wasn't some strange IE bug or the markup, and the from- scratch version works no problem. Here are the two examples, both are in the past lectures module: http://shaneriley.info/fldc/(with Cycle plugin)http://shaneriley.info/fldc/index_custom.html Anyone have any idea why this is happening? I haven't seen this happen before, however I may be using a more recent version than usual.
[jQuery] Re: jQuery + Firefox - Potential bug with hover event?
I've added an example with bare DOM event binds and that does not cause the problem. See link for example On Apr 23, 10:09 am, temega tem...@gmail.com wrote: I haven't tried that yet. I have tried it with the jQuery mouseleave and mouseenter events and same problem occurs. On Apr 23, 2:03 am, Dave Methvin dave.meth...@gmail.com wrote: Happens here as well. Does it happen with bare DOM functions too?
[jQuery] focus under window
Hello, I have a thickbox window with links. For one of these links, I would call an external site, but below my current page and close my thickbox. Is this possible? Thank you all.
[jQuery] Re: JQuery UI Accordion option collapsible:true not collapsing
Please bring this up over on the jQuery UI list: http://groups.google.com/group/jquery-ui Thanks. - Richard On Thu, Apr 23, 2009 at 8:30 AM, Nico nicope...@gmail.com wrote: I have a simple Accordion which I have given the settings: $(#accordion).accordion({ event: mouseover, header: h3, active: false, collapsible: true, autoHeight: true }); And has layout: div id=accordion h3 class=featured-pic-container111/h3 div pAAA/p /div h3 class=featured-pic-container222/h3 div pBBB/p /div h3 class=featured-pic-container333/h3 div pCCC/p /div /div I would like the whole accordion to collapse upon mouseout, but collapsible:true doesn't seem to do this. Any suggestions? Many thanks, Nico
[jQuery] weird problem with clicking on link
Hi all. I have a page that has a number of includes. The jquery in question shows/hides a div tag. Here is the code... $(document).ready(function(){ $(div#page_wrapper div#content a#pass_link).toggle(function(){ $(div#password).animate({ height: 'hide', opacity: 'hide' }, 'slow'); },function(){ $(div#password).animate({ height: 'show', opacity: 'show' }, 'slow'); }); }); in the body (within the same include file) I have a link a href=javacript:void(0) id=pass_link link text /a then I have a div tag that is set to display:none in CSS... div id=password some text/div I should be able to click on the a tag once and show the div tag. This works fine. Only problem is that I am unable to single click on it upon loading of the page, I must double click on it to activate the jquery. Once I have double clicked on the link one time, then I can activate jquery with a single click. If I re-load the page it starts over with the double click needed. Out of curiousity, I tried applying an onClick event handler onto the a tag and the same thing happened. Any thoughts? This is driving me CRAZY Thanks in advance.
[jQuery] help with jquery click browser problem
Hi all. I have a page that has a number of includes. The jquery in question shows/hides a div tag. Here is the code... $(document).ready(function(){ $(div#page_wrapper div#content a#pass_link).toggle(function(){ $(div#password).animate({ height: 'hide', opacity: 'hide' }, 'slow'); },function(){ $(div#password).animate({ height: 'show', opacity: 'show' }, 'slow'); }); }); in the body (within the same include file) I have a link javacript:void(0) link text then I have a div tag that is set to display:none in CSS... div id=password some text/div I should be able to click on the a tag once and show the div tag. This works fine. Only problem is that I am unable to single click on it upon loading of the page, I must double click on it to activate the jquery. Once I have double clicked on the link one time, then I can activate jquery with a single click. If I re-load the page it starts over with the double click needed. Out of curiousity, I tried applying an onClick event handler onto the a tag and the same thing happened. Any thoughts? This is driving me CRAZY I have only tested this in Firefox (mult. versions) and IE7 Thanks in advance. -- View this message in context: http://www.nabble.com/help-with-jquery-click-browser-problem-tp23190945s27240p23190945.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] jQuery and window.open (opening twice)
Hi all, I’ve got a script which will enable an entire div to be clickable, however when I click on the div it opens the URL twice.. Could someone please help me out? The code is: $(.rightContent).click(function(){ window.open($(this).find(a).attr(href)); return false; }); And here’s the div: div class=rightContent h3Google/h3 div style=margin-top: 5px;a href=http:// www.google.com/http://www.google.com//a/div div style=margin-top: 5px;info goes here/div /div Cheers Leanne
[jQuery] How to enable disable jquery Drag effect on click of a button?
Hello all, Query : 1. How to enable disable jquery Drag effect on click of a button? I am using this :- $(#image_to_map).draggable(); to apply the drag effect. Waiting for reply Regards Anand
[jQuery] [tooltip]: Multiple tooltips running from one set of parameters
I'm sure this question has a simple answer, it's just stumping me... I have multiple (about 15) tooltips based on your Fancy and Pretty demos that are attached to a series of HTML labels. All the tooltips use the same parameters: track: true, delay: 0, showURL: false, showBody: - , fixPNG: true, left: 30, top: -100, Its only the extraClass: that differs. How can i reduce code by stating the tooltip parameters just once for all tooltips, and then change the extraClass per tooltip? So the final code looks something like this: $(function() { $('.tooltip01, .tooltip02, .tooltip03').tooltip({ track: true, delay: 0, showURL: false, showBody: - , fixPNG: true, left: 30, top: -100 }); $('.tooltip01').tooltip({ extraClass: tooltip01_css }); $('.tooltip02').tooltip({ extraClass: tooltip02_css }); $('.tooltip03').tooltip({ extraClass: tooltip03_css }); });
[jQuery] Re: OpenLayers and JQuery
Hei Coop Take a look of this website http://docs.openlayers.org/casestudies/everyblock.html#everyblock-study They combine Jquery and OpenL Rengifo On Apr 7, 11:18 pm, Coop coob...@gmail.com wrote: Hello all, Has anyone figured out how to getOpenLayersto work with JQuery under IE? I'm trying suggestions listed at the below URLs with no luck. http://docs.jquery.com/Using_jQuery_with_Other_Librarieshttp://trac.openlayers.org/ticket/1391 Thanks, Coop
[jQuery] jQuery and window.open - opens twice?
Hi all, I’ve got a script which will enable an entire div to be clickable, however when I click on the div it opens the URL twice.. Could someone please help me out? (sorry if this is a double post, I don't think my first one went through..?) The code is: $(.rightContent).click(function(){ window.open($(this).find(a).attr(href)); return false; }); And here’s the div: div class=rightContent h3Google/h3 div style=margin-top: 5px;a href=http:// www.google.com/http://www.google.com//a/div div style=margin-top: 5px;info goes here/div /div Cheers Leanne
[jQuery] jquery click not working correctly
Hi all. I have a page that has a number of includes. The jquery in question shows/hides a div tag. Here is the code... $(document).ready(function(){ $(div#page_wrapper div#content a#pass_link).toggle(function(){ $(div#password).animate({ height: 'hide', opacity: 'hide' }, 'slow'); },function(){ $(div#password).animate({ height: 'show', opacity: 'show' }, 'slow'); }); }); in the body (within the same include file) I have a link #60;a href=javacript:void(0) id=pass_link#62; link text #60;/a#62; then I have a div tag that is set to display:none in CSS... div id=password some text/div I should be able to click on the a tag once and show the div tag. This works fine. Only problem is that I am unable to single click on it upon loading of the page, I must double click on it to activate the jquery. Once I have double clicked on the link one time, then I can activate jquery with a single click. If I re-load the page it starts over with the double click needed. Out of curiousity, I tried applying an onClick event handler onto the a tag and the same thing happened. Any thoughts? This is driving me CRAZY I have only tested this in Firefox (mult. versions) and IE7 Thanks in advance. -- View this message in context: http://www.nabble.com/jquery-click-not-working-correctly-tp23190969s27240p23190969.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] tablesorter plugin
I am working with tablesorter plugin and pager plugin. I have written code that looks for a class and decides whether or not to display the row based on which checkboxes are selected. Example: if i select the checkbox vehicles, the category id is 4, so jquery looks in the table for any rows with class cat_4 and show() is called. Problem: with the pager plugin, it only filters on the current page, it does not filter on the whole data set. How do I tweak and tell the tablesorter/pager plugin that certain are set to display:none so update the table and only include those rows that are set to show()?
[jQuery] Re: SuperFish Problem
Sorry I am not the best at programming these things myself. I installed this add-on for Joomla and don't understand why it's doesn't work. I didn't program itself, although do you see the problem I was talking about?
[jQuery] Re: SuperFish Problem
Sorry to say but like I said I just installed this add-on to Joomla, I did not program it all myself. Though, did you see what I was talking about on my site?
[jQuery] Combining cluetip with datepicker
I'm trying to get cluetip to work with the datepicker plugin. Basically, I want to set it up so that when you click on a date on the datepicker, a cluetip for that date opens and dynamically loads content appropriate for the selected date. The only part I haven't yet been able to figure out is how to trigger a cluetip based on selecting a date. I don't know if it's possible, and if so how I would, call the cluetip activate() function from the onSelect option of the datepicker. And, assuming I was able to do so, I'm also not sure how I would pass the date along to the AJAX call. I also tried just treating each individual date td generated by the datepicker as an element to have a cluetip applied to with a click activation, but that just caused the datepicker to fail to load... Is this at all possible?
[jQuery] Re: addClass and removeClass
I am also experiencing the same problem. any tips? On Apr 3, 7:23 am, Rob Lacey cont...@robl.me wrote: Hi there, I'm getting an interesting problem with addClass and removeClass. I'm attempting to build a rating system using radio buttons to select the rating. I'm actually hiding my radio buttons and styling the label to have pretty stars instead for a nicer interface. I want to highlight the star when the radio button is selected, so when the label is clicked by adding the 'active' class. I also need to remove the 'active' class from all other labels so that only one is selected at any one time. I assumed that removing the class from all of them and then re-adding for the one I am clicking would be the most efficient way for doing this like so. jQuery(document).ready(function () { jQuery('label.star').click(function (event) { jQuery('label.star').removeClass('active'); jQuery(event.target).addClass('active'); }); }); However this now has no effect, the class is simply not added at all now. Anyone got any ideas why this doesn't work? Cheers RobLhttp://www.robl.me
[jQuery] Using this within alsoResize attribute in Resizable
I have something that looks like this: $(this.container).resizable({ handles : 'w, e', alsoResize : 'div.stretchable', minWidth : 57, containment : 'div.drop_area', }); But I will have a bunch of these objects so I cannot use unique Ids so I must stick with classes. Usually I would simply do $(this div.stretchable) to acquire the element to alsoResize, but in this instance it only takes a string. I would like to do something like this: alsoResize : this + ' div.stretchable' but that does not work. I would really appreciate any ideas. Maybe some way of evaluating the statement as a string before parsing? This is really making it hard to do OOP using jQuery! Shoot me an email at mattmue...@gmail.com or reply to this post! Thanks in advance, Matt Mueller
[jQuery] [tooltip]: Multiple tooltips running from one set of parameters
I'm sure this question has a simple answer, it's just stumping me... I have multiple (about 15) tooltips based on your Fancy and Pretty demos that are attached to a series of HTML labels. All the tooltips use the same parameters: track: true, delay: 0, showURL: false, showBody: - , fixPNG: true, left: 30, top: -100, Its only the extraClass: that differs. How can i reduce code by stating the tooltip parameters just once for all tooltips, and then change the extraClass per tooltip? So the final code looks something like this: $(function() { $('.tooltip01, .tooltip02, .tooltip03').tooltip({ track: true, delay: 0, showURL: false, showBody: - , fixPNG: true, left: 30, top: -100 }); $('.tooltip01').tooltip({ extraClass: tooltip01_css }); $('.tooltip02').tooltip({ extraClass: tooltip02_css }); $('.tooltip03').tooltip({ extraClass: tooltip03_css }); });
[jQuery] Re: Lavalamp Trouble
What's it meant to be doing? On Apr 23, 6:36 am, MauiMan2 cmzieba...@gmail.com wrote: Can anybody find quicker than I can why it’s not working on my blog? http://ocmexfood.blogspot.com/(the orange nav near the top) I’m pretty sure I have all the elements in correctly. Thanks.
[jQuery] Errors with Animation with Jquery 1.3
I get this error when using UI and other animation effects o.speed is not a function Cannot seem to see why. Code below Anyone else seen this? script type=text/javascript src=http://ajax.googleapis.com/ajax/ libs/jquery/1.3/jquery.min.js/script script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/ jquery-ui.min.js type=text/javascript/script link rel=stylesheet href=http://ajax.googleapis.com/ajax/libs/ jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css type=text/css media=screen / script type=text/javascript src=stateSwitcher.js/script script $('document').ready(function(){ $('body').stateSwitcher(); $(#slidingPanel).slideOut(); $(#startdate).datepicker(); $(#enddate).datepicker(); }); (function($) { //only available to JQuery $.fn.stateSwitcher=function() { $('.altState').hide(); $(this).after('span id=stateControlSwitch State/span'); $('#stateControl').live(click,function(){ //Switch all elements on the page that have a equivalent hidden element // dictated $('.altState').css('display',''); $('.alt').hide(); $('.altState').show(); }); $('#stateControl').live(dblclick,function(){ //Switch all elements on the page that have a equivalent hidden element // dictated $('.alt').show(); $('.altState').hide(); }); return false; } })(jQuery); (function($) { $.fn.slideOut=function(options) { var me=this; var settings = $.extend({ trigger:'click',target:'.'+ me.attr(id),speed:'slow' }); if(options) { $.extend(settings, options); } $(settings.target).css(display,none); me.bind(settings.trigger,toggleElement); function toggleElement() { var target=settings.target; $(target).toggle(); if(!me.hasClass(open)) { me.addClass(open); } else { me.removeClass(open); $(target).css(display,none); } return false; } return false; } })(jQuery);
[jQuery] Re: Lavalamp Trouble
Class is not defined var TableKit = Class.create(); tablekit.js (line 30) On Apr 23, 1:36 am, MauiMan2 cmzieba...@gmail.com wrote: Can anybody find quicker than I can why it’s not working on my blog? http://ocmexfood.blogspot.com/(the orange nav near the top) I’m pretty sure I have all the elements in correctly. Thanks.
[jQuery] Re: Trying to highlight single error in two locations.
Sorry, yes, it is in regards to using the Validate Plug-in. On Apr 22, 3:15 pm, James james.gp@gmail.com wrote: Is this regarding the usage of the Validation plug-in? On Apr 22, 8:56 am, Tony tonysteph...@gmail.com wrote: I want my error to appear as it is, but I also want to add a class the li the form element is in. I can do this via : errorPlacement: function(error, element){ element.parents('li').addClass('error'); }, but I can't figure out how to make the class go away when the error is cleared. (basically I want the error message to popup, but I want to highlight the row the form element is in, and want the highlight to go away when the error is fixed.) What am I missing? Thanks. Tony
[jQuery] Re: Receiving Error - But functionality remains! - Strange!
Anyone have any clues on this? On Apr 16, 11:32 am, Dayjo dayjoas...@gmail.com wrote: Hey, I'm receiving the following error: Error: uncaught exception: Syntax error, unrecognized expression: # However all the functionality of the script continues to work, I need to get rid of the error as it looks pretty bad on client's sites and want to make sure the script isnt doing anything funny. The basic set up is a number of Select boxes, When selecting an option in the select boxes, I loop through a JSON stock array to see if the item is in stock and to then enable / disable the relevant options in the other selects based on the stock record. The error (as far as I can see) appears on this line: $(#option + nextid + option).filter(function(){ return($(this).attr('id') ==stockitem); }).enable(); but it seems to work fine. The following script is on the change event of the selects: // Get the next Select's id var thisorder = $(this).attr('rel').substr(0,$ (this).attr('rel').indexOf('|')); var next = $(this); $('.productOptions').find('select').each(function(){ if( $(this).attr('rel').substr(0,$(this).attr ('rel').indexOf('|')) == (parseInt(thisorder) + 1)) { next = $(this); } if ($(this).attr('rel').substr(0,$(this).attr ('rel').indexOf('|')) thisorder){ $(this).disableSel(); $(this).find('option:first').attr ('selected', 'selected').parent('select'); } }); var nextid = $(next).attr('id').replace ('option',''); // If not chosen the [Choose] option.. if($(this).children('[selected=true]').val()){ // Disable all the items in the next select apart from [choose/none] $(next).children('option[value!=]').disable(); // Check each of the stock records for(i=0; idata.stock.count; i++){ // For each of the selects get the option id and item id $('.productOptions').find('select [disabled=false]').each(function(){ var optionid = $(this).attr ('id').replace('option',''); var itemid = $(this).children ('[selected=true]').attr('id'); curritemid = data.stock[i].items [optionid]; if(curritemid != itemid){ qty = 0; stockitem = 0; return false; }else{ stockitem = data.stock[i].items [nextid]; qty = data.stock[i].qty; } }); if (stockitem!==0) { // Enable the item based on the current stock record, and the next selects id $(#option + nextid + option).filter(function(){ return($(this).attr('id') ==stockitem); }).enable(); } } $(next).enableSel(); }
[jQuery] ie6 onclick
hi, however come i can't use .click() in my tpl so i tried using the attr onclick. well it works in firefox and so on but not in ie6. code: $(.header_10).attr(onclick,blub()); function blub(){ alert('sdasd'); } thanks for any help.
[jQuery] Lightbox with thumbnails
Hi. I am looking for a version of lightbox that would allow the user to click on a single reference image and when the lightboxed version appears a strip of thumbnails would be available at the top or bottom of that image. Thus, the user could navigate between images within the lightbox by clicking on a different thumbnail. If such beast exists a URL would appreciated. Extensive Googling hasn't turned up what I'm looking for at all. TIA, Laker
[jQuery] Re: Lightbox with thumbnails
I certainly hope you find this because it is *exactly* what a client of mine is looking for and I was hoping to avoid having to code this up from scratch! Rick On Thu, Apr 23, 2009 at 10:25 AM, Laker Netman laker.net...@gmail.comwrote: Hi. I am looking for a version of lightbox that would allow the user to click on a single reference image and when the lightboxed version appears a strip of thumbnails would be available at the top or bottom of that image. Thus, the user could navigate between images within the lightbox by clicking on a different thumbnail. If such beast exists a URL would appreciated. Extensive Googling hasn't turned up what I'm looking for at all. TIA, Laker -- - It has been my experience that most bad government is the result of too much government. - Thomas Jefferson
[jQuery] Re: How to get JQuery to parse text as HTML
That didn't work either Klaus ... I think the issues is testHTML' is actually the 'html' return of a .ajax call. Still messing around with all this, but heres the new code sample if anyone has any ideas: $.ajax({ type: GET, url:searchUrl, success:function(html){ // I know this succeeds and is populated with the correct HTML return data console.log(html); results = $( '.liTemplateLocation', html ).html(); // Doesn't output anything console.log( TEST + results ); } }); On Apr 21, 4:39 pm, Klaus Hartl klaus.ha...@googlemail.com wrote: Try: $(.targetMe, $(testHTML)).html(); or: $(testHTML).find('.targetMe').html(); You might get into trouble with that and the html and body tags, not sure. In that case you had to create your own document fragment... --Klaus On 21 Apr., 03:28, default_user ayapej...@gmail.com wrote: I'm trying to get jquery to parse some text in a variable as HTML, has anyone tried this before and got it to work? Can this even be done, or do I have to parse as text? CODE testHTML = htmlhead/headbodyulli class='targetMe'TESTING/ li/ul/body/html; testGetHTML = $(.targetMe, testHTML).html(); alert( testGetHTML ); /CODE
[jQuery] Re: Superfish IE 6 - no menu appears
On Apr 20, 10:52 am, gfranklin gfrank...@gmail.com wrote: I am having the same problem withsuperfish. My code is not supported in Internet Explorer 6. No sub-menus appear. I modified the css considerably to meet the requirements of the design. If you found something that fixed your problem in the CSS, please post your findings. Thanks! -GF On Apr 7, 10:57 pm, Laker Netman laker.net...@gmail.com wrote: I have a dynamically-generated verticalsuperfishmenuworking in every browser *except* IE6, which I still have to support :\ When I hover on a top-levelmenuitem the second-levelmenuopens accordion-style (vertically) with a blank gap equal to what itsmenu's height would be, rather than a horizontal flyout. I noticed the arrow, indicating a submenu exists, jumps out to the right where the right margin of the second-levelmenushould have appeared. Below is my latestmenuCSS. The z-indexes were added to overcome a stacking issue with a DIV rotating images with Mike Alsup's cycle plugin, next to themenu. #nav { position: absolute; width: 145px; margin: 0px; padding: 0px; top: 126px; left: 2px; font-size: 10px; z-index: 5; } #nav ul { /* all lists */ padding: 0px; margin: 0px; list-style: none; width: 148px; z-index: 5; } #nav li { /* all list items */ border: none; position: relative; float: left; line-height: 27px; margin-bottom: -1px; width: 145px; height: 28px; } #nav li ul { /* second-level lists */ position: relative; padding: 0px; left: -999em; margin-left: 145px; margin-top: -50px; } #nav li ul ul { /* third-and-above-level lists */ left: -999em; margin-top: -30px; } #nav li a { width: 135px; w\idth: 135px; display: block; color: white; font-weight: bold; text-decoration: none; background: url(/images/buttonOff.png); padding: 0 0.5em; } #nav li a:hover { color: black; background: url(/images/buttonHover.png); } #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul { left: -999em; } #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { /* lists nested under hovered list items */ left: auto; } Cheers, Laker Nothing yet, and it's going to be problematic (project-wise) to use superfish if I can't get it straightened out. I'll be sure to post a solution *if* I can find one :) Laker
[jQuery] Ready event when loading a page with ajax
Greetings All, I am loading content into a page using the following: $(#someDiv).load(/Some.action,{id: someId}); The document that results from Some.action contains javascript at the top. I want the javascript to be executed when the resulting content is fully ready/loaded. I attempted to use the document ready: script type=text/javascript $(function() { console.log(READY); }); /script However the document is already ready since I am loading it into an existing page. I see READY in the console before the content is finished rendering. The only solutions I could come up with were: 1) Place the javascript at the bottom of the loaded page so that the prior DOM will have been loaded. 2) Place javascript into the callback function of the $ (#someDiv).load(...) call. Number 1 is fine. I'm just wondering if this is an acceptable way or if there is a better way. Number 2 is not acceptable because the fragment may be called from several other locations and I don't want repetitious code. Am I being thick headed here? Is there another better way? Brandon
[jQuery] Re: How to enable disable jquery Drag effect on click of a button?
See http://docs.jquery.com/UI/Draggable#method-enable http://docs.jquery.com/UI/Draggable#method-disable Also note: there's a separate mailing list for jQuery UI questions: http://groups.google.com/group/jquery-ui - Richard On Thu, Apr 23, 2009 at 5:00 AM, Anand anandprakashwankh...@gmail.comwrote: Hello all, Query : 1. How to enable disable jquery Drag effect on click of a button? I am using this :- $(#image_to_map).draggable(); to apply the drag effect. Waiting for reply Regards Anand
[jQuery] Re: Slideshow with Carousel and spotlight?
I came across this link today while looking for something completely different. http://design-notes.info/tutorial/jquery-tutorial/how-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator/ It looks like it combines jCarousel and Cycle. It would need tweaking to be ajax-friendly, but it's at least a proof of concept =) On Apr 15, 12:35 am, Jack Killpatrick j...@ihwy.com wrote: Hmm, I have a pretty big collection of plugin bookmarks, but looked through them and couldn't find something that seemed quite right, either. Found this, which seems like a near-hit: http://www.monc.se/galleria/demo/demo_01.htm#img/lightning.jpg and this, but it hooks to Flickr: http://www.userfriendlythinking.com/Blog/BlogDetail.asp?p1=7013p2=10... I'm interested in hearing if you find something. Good luck! - Jack rubycat wrote: For what it's worth, here's my plea for pretty much the same thing...the magic of Cycle combined with the utility of jCarousel. Have been agonizing over this, searching endlessly for an unobtrusive solution with no luck.
[jQuery] Re: slightly ot: image appended to href wraps to next line
anyone? thanks On Mar 27, 2:40 pm, Ken Post nntp.p...@gmail.com wrote: Hi all- I'm looking to do something that I'd think has been done many times before, I'm just not finding it... After all email links on an intranet site we have, we show an envelope icon. Simple enough. pThis is a topic here If you are looking for help on this, please contact a href=mailto:bobjo...@thedomain;Bob Jonesimg src=emailicon.gif style=width:10px;height:10px; //a/p I'm doing this with rel=email and jquery, but this is more of a html question so I posted the html code as rendered... If in the paragraph Bob is on the first line and Jones is on the second, that's fine, the whole think is linked, including the icon which will be inline, right after jones on the second line. The issue occurs when Jones is at the end of the first line and there's no more room for the image. This keeps Bob Jones on the first line, but moves only the image to the second line, which looks silly. Now, I could surely use white-space:nowrap in the A style, but that would cause Bob Jones to move to the second line, when what I really want is only Jones to move to the second line. Is there some keep-with-previous-word type of css that i could set on the style of the image? Now, I am using jquery to insert the image, and maybe there's some kind of modification that I can do to only the last word, like adding a div with no wrap... Thanks in advance for you ideas. Ken
[jQuery] Re: Can you help me understand .end() ?
Thanks so much Ricardo and MorningZ ! I think I have a good understanding now. On Apr 22, 7:11 pm, MorningZ morni...@gmail.com wrote: In the example provided on the page I was viewing, $(a).filter(.clickme).click(function(){ alert(You are now leaving the site.); }).end() can you describe what .end() is doing? .end() is doing absolutely nothing but at that point you are back to the collection of a's in the chain and could do something further I use it when i fill HTML of a div from an AJAX call... say i call .get and the HTML i am filling in has two buttons and i want to wire them up do an event div id=Results/div and i call make an ajax call and have this success event function(results) { } and the results object has the HTML of, and just keeping it simple: buttonDo Action A/buttonbuttonDo Action B/button then .end() could let me wire both those in one line like $(#Results) //You're at the div .html(results) //Filled, still @ div .find(button:first) //You are at 1st button .click(Action_A_Event) //Wired event, still @ button .end() //Back to div .find(button:last) //You are at 2nd button .click(Action_B_Event); //Wired event to 2nd button $.get(some url); On Apr 22, 4:25 pm, Ricardo ricardob...@gmail.com wrote: In the docs example end() is not doing anything useful, it's just showing where end() fits. I use it to avoid repeating selectors: $('#myform') .find('input') .click(fn..).end() .find('textarea') .mouseover(fn...).end() .find('label') .css('color', 'red'); Limiting the search to #myform descendants gives me faster results, and end() allows for a nice chaining structure. - ricardo On Apr 22, 5:15 pm, JKippes jessandthec...@gmail.com wrote: MorningZ and Ignacio, Thanks so much for the examples. Both helped me understand .end() better. I have a couple additional questions to solidfy my understanding. Is this example, $(div).find(span).css('background':'red').end().css ('background':'green'); mainly where you see .end() being used? For when you want to attach different property settings to elements within the same container? In the example provided on the page I was viewing, $(a).filter(.clickme).click(function(){ alert(You are now leaving the site.); }).end() can you describe what .end() is doing? There isn't anything in the chain after that point, and I'm not sure what it would be backing up to. Thanks again. On Apr 22, 1:28 pm, Ignacio Cortorreal luis3igna...@gmail.com wrote: if you do something like: $(div).find(span).css('background':'red').end().css('background':'green'); spans will be red, and the divs will be green. .end() reset the chain to the first selector On Wed, Apr 22, 2009 at 2:05 PM, MorningZ morni...@gmail.com wrote: Say you have the html of div spanOne/span spanTwo/span spanThree/span /div and say: var $obj = $(div); your jQuery object, $obj, will be just the div tag Now if you say var $obj = $(div).find(span); that would first be an object representing the div and the .find() makes it be an object of the 3 span tags If the statement was (and granted this doesn't make sense, but just an example) var $obj = $(div).find(span).end(); that would be just the div tag again although walking through the selector, $obj would have been the div, then would have represented the found span tags, called .end() backs off the .find() and goes back to the div thinking of the chained command like a deck of cards helps :-) On Apr 22, 12:41 pm, JKippes jessandthec...@gmail.com wrote: Please referencehttp://docs.jquery.com/How_jQuery_Works, the Chainability segment. I'm confused on the given description of .end(): You can take this even further, by adding or removing elements from the selection, modifying those elements and then reverting to the old selection, for example: $(a) .filter(.clickme) .click(function(){ alert(You are now leaving the site.); }) .end() a href=http://google.com/; class=clickmeI give a message when you leave/a Methods that modify the jQuery selection and can be undone with end(), are the following: add(), children(), eq(), filter(), find(), next(), not(), parent(), parents(), siblings() and slice(). What does reverting and undone mean here? When I run the code, the link click event runs the alert, I hit Ok, and it passes me to Google. So the words reverting and undone
[jQuery] Re: Lightbox with thumbnails
Maybe this one? http://spaceforaname.com/gallery-customized.html main page: http://spaceforaname.com/galleryview - Jack Rick Faircloth wrote: I certainly hope you find this because it is *exactly* what a client of mine is looking for and I was hoping to avoid having to code this up from scratch! Rick On Thu, Apr 23, 2009 at 10:25 AM, Laker Netman laker.net...@gmail.com mailto:laker.net...@gmail.com wrote: Hi. I am looking for a version of lightbox that would allow the user to click on a single reference image and when the lightboxed version appears a strip of thumbnails would be available at the top or bottom of that image. Thus, the user could navigate between images within the lightbox by clicking on a different thumbnail. If such beast exists a URL would appreciated. Extensive Googling hasn't turned up what I'm looking for at all. TIA, Laker -- - It has been my experience that most bad government is the result of too much government. - Thomas Jefferson
[jQuery] Can't reproduce modal behavior - how to prevent clicks?
I'm trying to prevent any mouse clicks on my page (if only for a short time), and I have this working on a very simple test page, but within my application (that has a very large DOM footprint) nothing is working. function noop(){ return false; } jQuery( document ).bind( 'click mousedown mouseup', noop ); I am running this code well after the DOM is loaded. I've tried binding to document, document.body, *, and window. I am not dealing with any frames. I've also tried unbinding any click/mousedown events prior to binding. I am currently using jQuery 1.2.6, although for fitness I tested this with 1.3.2 but I get the same results. What could I be doing wrong?
[jQuery] Re: Ready event when loading a page with ajax
#2 will probably be your best bet. I am pretty sure that if the page you're retrieving has script blocks, they'll be parsed out and inserted into the head of the document -- before the actual HTML is injected into the body. On Apr 23, 9:30 am, Brandon brandon.goo...@gmail.com wrote: Greetings All, I am loading content into a page using the following: $(#someDiv).load(/Some.action,{id: someId}); The document that results from Some.action contains javascript at the top. I want the javascript to be executed when the resulting content is fully ready/loaded. I attempted to use the document ready: script type=text/javascript $(function() { console.log(READY); }); /script However the document is already ready since I am loading it into an existing page. I see READY in the console before the content is finished rendering. The only solutions I could come up with were: 1) Place the javascript at the bottom of the loaded page so that the prior DOM will have been loaded. 2) Place javascript into the callback function of the $ (#someDiv).load(...) call. Number 1 is fine. I'm just wondering if this is an acceptable way or if there is a better way. Number 2 is not acceptable because the fragment may be called from several other locations and I don't want repetitious code. Am I being thick headed here? Is there another better way? Brandon
[jQuery] Re: Lightbox with thumbnails
Yes! That should be perfect...thumbnails, main photo, captions, slideshow, and manual navigation! Thanks! Rick On Thu, Apr 23, 2009 at 11:28 AM, Jack Killpatrick j...@ihwy.com wrote: Maybe this one? http://spaceforaname.com/gallery-customized.html main page: http://spaceforaname.com/galleryview - Jack Rick Faircloth wrote: I certainly hope you find this because it is *exactly* what a client of mine is looking for and I was hoping to avoid having to code this up from scratch! Rick On Thu, Apr 23, 2009 at 10:25 AM, Laker Netman laker.net...@gmail.comwrote: Hi. I am looking for a version of lightbox that would allow the user to click on a single reference image and when the lightboxed version appears a strip of thumbnails would be available at the top or bottom of that image. Thus, the user could navigate between images within the lightbox by clicking on a different thumbnail. If such beast exists a URL would appreciated. Extensive Googling hasn't turned up what I'm looking for at all. TIA, Laker -- - It has been my experience that most bad government is the result of too much government. - Thomas Jefferson -- - It has been my experience that most bad government is the result of too much government. - Thomas Jefferson
[jQuery] Production problem: automation server can't create object
Hallo all. I have a problem with a system in production environment. Unfortunately the error is not systematic and I cannot reproduce it in development environment. The client has ie6 and the page he is visiting is made with the tabs plugin. I read on internet that disabling activex may cause problems like this. Is there any way to debug in a better way this problem? Kind regards Massimo
[jQuery] Re: Lavalamp Trouble
Here's the jQuery Lava Lamp page: http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/ As you can see in the example at the top a liquidy grayish rounded corner background image follows the cursor around to whatever link is currently being hovered over. In my implementation though the interactive effect is not working. I am going to keep troubleshooting it on my own but if somebody could locate the problem before I do then that would be a big help. Thanks. On Apr 23, 1:37 am, glyn3332 glyn.moo...@googlemail.com wrote: What's it meant to be doing? On Apr 23, 6:36 am, MauiMan2 cmzieba...@gmail.com wrote: Can anybody find quicker than I can why it’s not working on my blog? http://ocmexfood.blogspot.com/(theorange nav near the top) I’m pretty sure I have all the elements in correctly. Thanks.
[jQuery] Re: Lightbox with thumbnails
Cool. The one thing I wonder about is mixed images in landscape and portrait modes. Most gallery demos don't show that, I'm guessing cuz it's less pretty, but from my experience it's often matters. I haven't looked carefully at that one to see how it will handle those. - Jack Rick Faircloth wrote: Yes! That should be perfect...thumbnails, main photo, captions, slideshow, and manual navigation! Thanks! Rick On Thu, Apr 23, 2009 at 11:28 AM, Jack Killpatrick j...@ihwy.com mailto:j...@ihwy.com wrote: Maybe this one? http://spaceforaname.com/gallery-customized.html main page: http://spaceforaname.com/galleryview - Jack Rick Faircloth wrote: I certainly hope you find this because it is *exactly* what a client of mine is looking for and I was hoping to avoid having to code this up from scratch! Rick On Thu, Apr 23, 2009 at 10:25 AM, Laker Netman laker.net...@gmail.com mailto:laker.net...@gmail.com wrote: Hi. I am looking for a version of lightbox that would allow the user to click on a single reference image and when the lightboxed version appears a strip of thumbnails would be available at the top or bottom of that image. Thus, the user could navigate between images within the lightbox by clicking on a different thumbnail. If such beast exists a URL would appreciated. Extensive Googling hasn't turned up what I'm looking for at all. TIA, Laker -- - It has been my experience that most bad government is the result of too much government. - Thomas Jefferson -- - It has been my experience that most bad government is the result of too much government. - Thomas Jefferson
[jQuery] How to activate a click dynamically on a link and also call another function
I have a link as follows. a href=march2009.html onclick=return hs.htmlExpand(this, {contentId: 'highslide-html-1', objectWidth: 600, objectHeight: 510, width: 600}) id=leadershipMsgId class=highslide whiteulMessage/ a In jQuery, I would like to automatically invoke a click event on the above link (calls htmlExpand function) based on a condition and also I would like to call another function (showHideLeadershipMsg) after the link is invoked. The following code does not work properly. if(newLdrshipMsg) { $('#leadershipMsgId').click(); //works $('#leadershipMsgId').click( function() { showHideLeadershipMsg(curMessageNum,'leadershipMsgCk'); //not getting called }); } What am I missing ?
[jQuery] jquery combobox
Hello all, I used this http://jquery.sanchezsalvador.com/samples/example.htm script for a while but now i use a newer version of jquery and it doesnt work anymore i get this kind of errors 'Syntax error, unrecognized expression: [...@datavalue='Aanval']' Could someone have a look at that script and tell me how it can work again Thx,
[jQuery] Dymanic added/executed script
Hi! This question is not exactly related to jquey but to javascript in general. I'm apologize for the almost off-topic Using ajax and jquery I'm calling a function on the server code that returns a javascript script that I need to assign to a div and get executed automatically when assigned. So far I couldn't do that, seems that the assigned script to the innerHTML of the div can'r be executed dynamically. Basically I'd like something like assign an alert('hello world') to the innerHTML and automatically see the pop up with the message. Is this possible? Thanks! Claudio
[jQuery] InsertAfter Documentation
Hello, I'm just getting started, but the Documentation for the InsertAfter Demo is confusing to me: Is it moving the p is what I said... /p (Which it looks like its doing). Or is suposed to Insert something? Thanks, Mike !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head script src=http://code.jquery.com/jquery-latest.js;/script script $(document).ready(function(){ $(p).insertAfter(#foo); // check after() examples }); /script style#foo { background:yellow; }/style /head body p is what I said... /pdiv id=fooFOO!/div /body /html
[jQuery] 2 Superfish menus on one page (1 verticle, 1 horizontal)
I can get them both to display but I need to style each one differently I have copied the basic styles and renamed them xx2 and then renamed the ul class to match but it doesn't like it!! Anyone have any ideas?
[jQuery] Designer new to jQuery. Using Greasemonkey and jQuery
Hi there. I'm not very good at scripting or programming but at least with jQuery some of it makes sense to me and so I'm trying to build a custom script that alters some of the functionallity of the website rememberthemilk.com but I can't get past one problem. Any query I put through jQuery gets reset when I click elsewhere on the page. What do I need to do to prevent RTM from reseting all my hard work in jQuery? For example at the moment I have the following code... pre // When the page is ready $(document).ready(function() { // Change element to red background $(.xtd_tag:contains('+')).css(background, red); }); pre This makes all .xtd_tag elements which contain the plus (+) character have a red background on initial load but when I click on another list in RTM it goes back to normal. Many thanks for your time, Gavin
[jQuery] jQuery CSS 3 Compliant - but does it fix CSS?
The jQuery home page says jQuery is CSS 3 Compliant. This is a dumb question: but does that imply that it fixes CSS 3 in all browsers or just that it supports CSS 3 selectors? I have a feeling it's the later.
[jQuery] Show/Hide Content won't hide last record?
I have a loop to display all the records in my table and am using the show/hide content function on the record link so the info displays in a box (div) anyways, for some reason the last record on the page always has it's div box open, and the close and toggle links don't work for that record, all the rest are fine, what can cause this? -- View this message in context: http://www.nabble.com/Show-Hide-Content-won%27t-hide-last-record--tp23197453s27240p23197453.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Executing dynamic script
Hi! This question is not exactly related to jquey but to javascript in general. I'm apologize for the almost off-topic Using ajax and jquery I'm calling a function on the server code that returns a javascript script that I need to assign to a div and get executed automatically when assigned. So far I couldn't do that, seems that the assigned script to the innerHTML of the div can'r be executed dynamically. Basically I'd like something like assign an alert('hello world') to the innerHTML and automatically see the pop up with the message. Is this possible? Thanks! Claudio
[jQuery] Re: superfish multiple menu
Did you get anywhere with this? as I have the same problem On Apr 7, 5:28 am, Viktor Iwan veematic...@gmail.com wrote: Hello, i think this one is pretty simple to do.. i would like to have multiplesuperfishmenu with different style.. any clue how to do this ? i'm new to jquery
[jQuery] selecting class under a parent class
Need help selecting the class details under a parent class two when class trigger is clicked. $().ready(function(){ $('.trigger).click(function(event){ var thisItem = $(this).parent(); // set thisItem to .two $(thisItem).$('.details').slideToggle(); // toggle .details in .two }) }) div class=one div class=twospan class=triggertrigger/span div class=detailssome stuff/div /div /div div class=one div class=twospan class=triggertrigger/span div class=detailssome stuff/div /div /div div class=one div class=twospan class=triggertrigger/span div class=detailssome stuff/div /div /div
[jQuery] Re: AJAX xml problem
Is there no way to escape the ':'? Btw, I don't find it surprising that IE6 has a problem. On Apr 21, 10:01 am, Michael Lawson mjlaw...@us.ibm.com wrote: If you put a : in a jQuery selector, jQuery thinks you are going to be declaring a filter. btw [nodeName=] may not owrk in ie6. Might want to verify. Anyone from jQuery knows if any work is being done to fix xml namespaces? 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: barton bartonphill...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 04/21/2009 11:59 AM Subject: [jQuery] Re: AJAX xml problem Thanks that worked -- but why does $item.find(media:thumbnail) not work? I can get the other items with, for example, $item.find (description). I guess it is the ':' that makes the difference but why? Thanks again. On Apr 20, 1:42 pm, Michael Lawson mjlaw...@us.ibm.com wrote: try this $([nodeName=media:thumbnails]); 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: barton bartonphill...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 04/20/2009 03:30 PM Subject: [jQuery] Re: AJAX xml problem Is this one just too difficult to answer? On Apr 17, 1:08 pm, barton bartonphill...@gmail.com wrote: I have a rss feed and want to navigate to media:thumbnails url=' etc. I can't figure out what to use for a selector as the media:thumbnails just doesn't work. I am doing a .find(). Any ideas. The feed ishttp://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml which I get via a php proxy athttp://www.bartonphillips.dyndns.org/test/test.php?xml=1 Thanks graycol.gif 1KViewDownload ecblank.gif 1KViewDownload graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] Re: AJAX xml problem
I've heard of people doing /: or //: or ///: but i've never had that work for me. 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: barton bartonphill...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 04/23/2009 01:23 PM Subject:[jQuery] Re: AJAX xml problem Is there no way to escape the ':'? Btw, I don't find it surprising that IE6 has a problem. On Apr 21, 10:01 am, Michael Lawson mjlaw...@us.ibm.com wrote: If you put a : in a jQuery selector, jQuery thinks you are going to be declaring a filter. btw [nodeName=] may not owrk in ie6. Might want to verify. Anyone from jQuery knows if any work is being done to fix xml namespaces? 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: barton bartonphill...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 04/21/2009 11:59 AM Subject: [jQuery] Re: AJAX xml problem Thanks that worked -- but why does $item.find(media:thumbnail) not work? I can get the other items with, for example, $item.find (description). I guess it is the ':' that makes the difference but why? Thanks again. On Apr 20, 1:42 pm, Michael Lawson mjlaw...@us.ibm.com wrote: try this $([nodeName=media:thumbnails]); 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: barton bartonphill...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 04/20/2009 03:30 PM Subject: [jQuery] Re: AJAX xml problem Is this one just too difficult to answer? On Apr 17, 1:08 pm, barton bartonphill...@gmail.com wrote: I have a rss feed and want to navigate to media:thumbnails url=' etc. I can't figure out what to use for a selector as the media:thumbnails just doesn't work. I am doing a .find(). Any ideas. The feed ishttp://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml which I get via a php proxy athttp://www.bartonphillips.dyndns.org/test/test.php?xml=1 Thanks graycol.gif 1KViewDownload ecblank.gif 1KViewDownload graycol.gif 1KViewDownload ecblank.gif 1KViewDownload inline: graycol.gifinline: ecblank.gif
[jQuery] Galleria thumbs not vertically aligned correctly in Safari
Im using Galleria on this page and in Safari, strangely the thumbnails bump down inside their container by 12px. Can anyone see why this is happening to me in Safari only? http://www.viewwestaspen.com.asp1-10.websitetestlink.com/property_detail.aspx?id=106490#images/2009020701242469178300-5.jpg Thanks!
[jQuery] Re: selecting class under a parent class
Should do the trick since details is the next object from the clicked span $().ready(function(){ $('.trigger).click(function() { $(this).next().slideToggle(); }) }) On Apr 23, 12:57 pm, jseg jsegur...@gmail.com wrote: Need help selecting the class details under a parent class two when class trigger is clicked. $().ready(function(){ $('.trigger).click(function(event){ var thisItem = $(this).parent(); // set thisItem to .two $(thisItem).$('.details').slideToggle(); // toggle .details in .two })}) div class=one div class=twospan class=triggertrigger/span div class=detailssome stuff/div /div /div div class=one div class=twospan class=triggertrigger/span div class=detailssome stuff/div /div /div div class=one div class=twospan class=triggertrigger/span div class=detailssome stuff/div /div /div
[jQuery] Re: jquery combobox
The @ was deprecated in 1.2. Search the script for the @ sign and remove it. On Apr 23, 9:54 am, Langras lang...@gmail.com wrote: Hello all, I used thishttp://jquery.sanchezsalvador.com/samples/example.htm script for a while but now i use a newer version of jquery and it doesnt work anymore i get this kind of errors 'Syntax error, unrecognized expression: [...@datavalue='Aanval']' Could someone have a look at that script and tell me how it can work again Thx,
[jQuery] flowplayer: how to loop a single movie?
Does anyone know how to loop the playback of a single movie using Flowplayer? ( http://flowplayer.org/ ) I want it to autostart (got that part), play, then repeat endlessly. TIA, Jack
[jQuery] Re: How to activate a click dynamically on a link and also call another function
Try switching the ordering: if(newLdrshipMsg) { $('#leadershipMsgId').click( function() { showHideLeadershipMsg (curMessageNum,'leadershipMsgCk'); }); $('#leadershipMsgId').click(); } The click(...) defines what happens when you click it. It doesn't actually perform the click. The click() performs the click. On Apr 23, 5:38 am, vmrao maheshpav...@gmail.com wrote: I have a link as follows. a href=march2009.html onclick=return hs.htmlExpand(this, {contentId: 'highslide-html-1', objectWidth: 600, objectHeight: 510, width: 600}) id=leadershipMsgId class=highslide whiteulMessage/ a In jQuery, I would like to automatically invoke a click event on the above link (calls htmlExpand function) based on a condition and also I would like to call another function (showHideLeadershipMsg) after the link is invoked. The following code does not work properly. if(newLdrshipMsg) { $('#leadershipMsgId').click(); //works $('#leadershipMsgId').click( function() { showHideLeadershipMsg(curMessageNum,'leadershipMsgCk'); //not getting called }); } What am I missing ?
[jQuery] Re: Ready event when loading a page with ajax
jQuery.ready is executed when the main document is loaded completely. Loading markup from a separate AJAX call from the main document is not included. As ken mentioned, option #2 is probably the best way to go. #1 will not always work (might not even work at all) because you're racing against the AJAX response time. On Apr 23, 5:51 am, ken jqu...@kenman.net wrote: #2 will probably be your best bet. I am pretty sure that if the page you're retrieving has script blocks, they'll be parsed out and inserted into the head of the document -- before the actual HTML is injected into the body. On Apr 23, 9:30 am, Brandon brandon.goo...@gmail.com wrote: Greetings All, I am loading content into a page using the following: $(#someDiv).load(/Some.action,{id: someId}); The document that results from Some.action contains javascript at the top. I want the javascript to be executed when the resulting content is fully ready/loaded. I attempted to use the document ready: script type=text/javascript $(function() { console.log(READY); }); /script However the document is already ready since I am loading it into an existing page. I see READY in the console before the content is finished rendering. The only solutions I could come up with were: 1) Place the javascript at the bottom of the loaded page so that the prior DOM will have been loaded. 2) Place javascript into the callback function of the $ (#someDiv).load(...) call. Number 1 is fine. I'm just wondering if this is an acceptable way or if there is a better way. Number 2 is not acceptable because the fragment may be called from several other locations and I don't want repetitious code. Am I being thick headed here? Is there another better way? Brandon
[jQuery] Re: ie6 onclick
Use: $(.header_10).click(blub); On Apr 23, 4:18 am, weidc mueller.juli...@googlemail.com wrote: hi, however come i can't use .click() in my tpl so i tried using the attr onclick. well it works in firefox and so on but not in ie6. code: $(.header_10).attr(onclick,blub()); function blub(){ alert('sdasd'); } thanks for any help.
[jQuery] Re: Jqgrid, row edit, posting to the server not working
Thanks...I got it.. I was overwriting the default data with editdata{} function. Regards, Nat On Apr 22, 2:34 pm, Natkeeran L.K. natkee...@gmail.com wrote: It loads the field names instead of values into the db Regards, Nat On Apr 22, 2:26 pm, NatkeeranL.K. natkee...@gmail.com wrote: Actually, it does not load it the db http://pssnet.com/~devone/ajqtable/editgrid2.html include(dbc.php); $var1 = $_POST['service_id']; $var2 = $_POST['name']; //$var1 = abc; //$var2 = xyz; mysql_query(INSERT INTO testwrite (service_id, name) VALUES('$var1', '$var2') ) or die(mysql_error()); Regards, Nat On Apr 22, 2:13 pm, NatkeeranL.K. natkee...@gmail.com wrote: Hello Tony: Thanks for reply. Loaded those to the header:http://pssnet.com/~devone/ajqtable/editgrid2.html When clicked over it,the form automatically closes it. Regards, Nat On Apr 22, 1:43 pm, Tony t...@trirand.com wrote: Hello, FireFox console reported a error: jQuery(a).jqDrag is not a function This means that you do not have loaded: 1. jqModal.js 2. jqDnR.js 3. jqModal.css Load these files in your head section Regards Tony On Apr 22, 8:32 pm, NatkeeranL.K. natkee...@gmail.com wrote: Hello: I am using Jqgrid, and testing how the editing feature work. When the row is clicked, it shows the form to edit. However, entering the info and submitting does not work. http://pssnet.com/~devone/ajqtable/editgrid.html(Alsoseebelow) At the php side I am simply trying to get those parameters and write to db. $var1 = $_POST['service_id']; $var2 = $_POST['name']; Any help appreciated. Thanks. Regards, Nat jQuery(document).ready(function(){ var lastsel; jQuery(#list2).jqGrid({ url:'summary3.php?nd='+new Date().getTime(), datatype: json, colNames:['service_id', 'Services'], colModel:[ {name:'service_id',index:'service_id', width:75, editable: true}, {name:'name',index:'name', width:175, editable: true}, ], pager: jQuery('#pager2'), rowNum:10, rowList:[10,20,30], imgpath: 'themes/sand/images', sortname: 'id', viewrecords: true, sortorder: asc, editurl: 'editgrid.php', myType: POST, caption: Service Types }); $(#bedata).click(function(){ var gr = jQuery(#list2).getGridParam('selrow'); alert(gr); if( gr != null ) jQuery(#list2).editGridRow(gr, {editData:{name: name, service_id: service_id}},{height:280,reloadAfterSubmit:true}); else alert(Please Select Row); }); }); !-- End Firs JQuery --
[jQuery] Re: jQuery and window.open - opens twice?
Could you define what it opens the URL twice mean? Does it mean it opens two windows each loading google.com? If so, it might mean you're possibly re-binding the click again to the div somewhere in your code. If would help a lot if you can post all your code or to a page that demonstrates the issue. On Apr 22, 7:02 pm, SoulieBaby lea...@souliedesigns.com.au wrote: Hi all, I’ve got a script which will enable an entire div to be clickable, however when I click on the div it opens the URL twice.. Could someone please help me out? (sorry if this is a double post, I don't think my first one went through..?) The code is: $(.rightContent).click(function(){ window.open($(this).find(a).attr(href)); return false; }); And here’s the div: div class=rightContent h3Google/h3 div style=margin-top: 5px;a href=http://www.google.com/;http://www.google.com//a/div div style=margin-top: 5px;info goes here/div /div Cheers Leanne
[jQuery] Re: Slideshow with Carousel and spotlight?
You got me all excited! Alas, it looks like there is a disconnect between the two scripts. For example, the carousel doesn't scroll beyond the initial thumbnails displayed, even if the cycle part advances beyond that. Rats. Am wistfully hoping that the jquery slideshow being developed here http://spaceforaname.com/galleryview will overcome a bug in IE wherein overlays do not correctly fade in/ out during panel transitions. Looks promising, yes?
[jQuery] Re: Some pseudo help if you'd be so kind?
Hey Ricardo, I've been playing around with this script, which you kindly wrote for me, over the past hour. I think I can use it, although: - I'd initially like the appropriate 'previous' and 'next' links left out if there's no more posts to display. The problem is ATM 'previous' does nothing initially, and the nth 'next' displays no posts and leave me with no other way to navigate back to them, apart from refreshing the page! - Also would love to be able to hop back to the start of the post excerpts once the function to display three new posts has run. Not sire how to inlcude the equivilent of: a href=#content id=moreNext 3/a within the JS function? Thanks man, L PS. Cheers for the other comments guys. I've picked up a lot more knowledge analysing what you're doing there because of your time. On Apr 23, 5:10 am, Ricardo ricardob...@gmail.com wrote: No need for IDs, you can do it all using the elements' indexes: Assuming a structure like this: ul id=posts li.../li ... /ul a href=# id=moreNext 3/a a href=# id=lessPrevious 3/a I'd use this. A bit busy, but it's short! :) //hide all but the first 3 posts $posts = $('#posts li').show(); $posts.filter(':gt(2)').hide(); //set the navigation $('#more,#less').click(function(){ var op = function(x){ return x ? 'next' : 'prev'; } var m = this.id == 'more'; //get last OR first visible post var visible = $posts.filter(':visible:'+ (m ? 'last' : 'first')); //if any posts left - next() or prev() if (visible[op(m)]().length) //hide all visible, show next/prev 3 $posts.filter(':visible').hide(); visible[op(m)+'All'](':lt(3)').show().end() return false; }); You can replace show and hide for fadeIn and fadeOut for a nice effect. cheers, - ricardo On Apr 22, 11:18 am, ldexterldesign m...@ldexterldesign.co.uk wrote: Hey guys, I have 10 separate posts displayed on a page. I want to hide 7 (of the oldest) of them and display a link; 'show more posts' - kinda a pagination thing I guess. My PHP pumps out 10 posts, and I'd like to do the hide/show with JS. I'm aware I could simply add and remove a height class, hiding/ revealing the posts, but I'd like to make it a bit more complex and have accurate control over how many posts are shown if my client turns around and says he wants 5 posts displayed prior to the button being clicked. Just thinking about how I might go about this in code I'm thinking of doing it the following way. I'm not an excellent programmer, so the time you'd, potentially, save me getting it clear in pseudo will most likely save me a lot of time this evening. Hell, there might even be a plug-in or simpler solution than below you can think of: - I get a unique 'post-x' ID for each of the posts, where 'x' is the post ID, so I was thinking about just hiding the lowest 7 numeric post IDs displayed on the page? Thoughts? :] L
[jQuery] How-to suggestion
I'm building a little UI control with 3 buttons that slide one of three DIVs (corresponding to the UI control button pushed) that reside inside a container DIV. Something like: a class=button redRed/a a class=button blueBlue/a a class=button greenGreen/a div class=container div id=redRed stuff here/div div id=blueBlue stuff here/div div id=greenGreen stuff here/div /div So... The container DIV is, say, 200px wide. Each internal DIV is also 200px wide. So only one is visible at any time. The user clicks a class=button greenGreen/a, and the container DIV smoothly scrolls from left-to-right (red to blue). (I don't want scroll bars to appear (overflow:hidden). I just want the view to slide left or right between the red, green, blue DIVs.) I found some plug-ins that do shuffling of photos (the Cycle plugin looks very nice), but this is a single, simple feature, with no fancy transitions (other than sliding), I'd like to do it with core jQuery. Any suggestions on a basic implementation $(a.button).live(click, function(){ ... ...Rene
[jQuery] A problem setting timeout feature in AJAX.
Hello, I have a jquery HTML page which loads a form. The form has a bunch of settings, but eventually the form gets submitted using a post command (see below) which returns and HTML page which was built by a script running on the server. This works fine, except when the script runs longer than 5 minutes. The post command just returns nothing. I tried using the timeout command in the high level page as follows: $.ajaxSetup({cache: false, timeout: 1800 }) ; But this does not seem to work. Does anyone have a suggestion? Here is the post command: $.post('/cgi-bin/tw_lookup_3.cgi', lookupData, function(data){ // $('#results').load( prefix + user_name + / TW_LOOKUP_RESULTS.html); // $('#results a').attr('target','_blank').css ('backgroundColor','#d5e9d7'); var page = $(data).find('input[name=result_dir]').val(); $('#results').load( page + /TW_LOOKUP_RESULTS.html); $('#SubmitQuery').attr('disabled',false); $('#SubmitQuery').val('Submit Query'); $('#SubmitQuery').css('backgroundColor',''); $('#SubmitQuery').css('color',''); },html);
[jQuery] Passing info from Modal Window to a specific div or accordion (jqModal ?)
Hello I need to implement a functionality where based on certain selection, I have to present a form, and collect that data and pass it to the caller div or accordion. (I would place the form within the accordion, but it does not support external file load). The div id dynamically generated as here (http://pssnet.com/~devone/ajqtable/summary3997b.html), so I have to be able to specify where to place the data. I am trying to use JqModal. Is it possible with JqModal. Regards, Nat
[jQuery] Re: Lightbox with thumbnails
That could be a problem for some. For my purposes (showing real estate photos), all the photos will be resized to the same size, so that shouldn't be an issue. Actually, even if I had both landscape and portrait photos, I'd prefer that the container remain the same size for speed and for consistency in the space for comments. It's less attractive than having the full window taken up by the image, but the constant shifting of the window size is distracting to me. Rick On Thu, Apr 23, 2009 at 12:36 PM, Jack Killpatrick j...@ihwy.com wrote: Cool. The one thing I wonder about is mixed images in landscape and portrait modes. Most gallery demos don't show that, I'm guessing cuz it's less pretty, but from my experience it's often matters. I haven't looked carefully at that one to see how it will handle those. - Jack Rick Faircloth wrote: Yes! That should be perfect...thumbnails, main photo, captions, slideshow, and manual navigation! Thanks! Rick On Thu, Apr 23, 2009 at 11:28 AM, Jack Killpatrick j...@ihwy.com wrote: Maybe this one? http://spaceforaname.com/gallery-customized.html main page: http://spaceforaname.com/galleryview - Jack Rick Faircloth wrote: I certainly hope you find this because it is *exactly* what a client of mine is looking for and I was hoping to avoid having to code this up from scratch! Rick On Thu, Apr 23, 2009 at 10:25 AM, Laker Netman laker.net...@gmail.comwrote: Hi. I am looking for a version of lightbox that would allow the user to click on a single reference image and when the lightboxed version appears a strip of thumbnails would be available at the top or bottom of that image. Thus, the user could navigate between images within the lightbox by clicking on a different thumbnail. If such beast exists a URL would appreciated. Extensive Googling hasn't turned up what I'm looking for at all. TIA, Laker -- - It has been my experience that most bad government is the result of too much government. - Thomas Jefferson -- - It has been my experience that most bad government is the result of too much government. - Thomas Jefferson -- - It has been my experience that most bad government is the result of too much government. - Thomas Jefferson
[jQuery] Loading before dom = ready - Best Practices.
While virtually every site in existence trumpets using the jQuery DOM- ready shortcut as an absolute must, I've come across situations which I feel frustrate the user, particularly when using jQuery to create a navigational element. I often work on sites which are going to have a lot of external content (ads, feeds, analytics), and if even one of them is sluggish to load, none of my interactive elements are responsive for that time. There seem to be three options: 1] liveQuery (disadvantage: overhead) 2] popping a loading message over the whole page (disadvantage: ridiculous) 3] nesting an image inside the portion of the DOM we need, and using an onLoad event (disadvantage: poor semantics). Anyone else come across any novel ways around this seemingly under- discussed issue?
[jQuery] [Tooltip] Fairly Large 'Fade' Bug
The bug: when fade is utilized, tooltips inherit the colors (and perhaps other attributes) of nearby tooltips that were just switched off of. To reproduce: create 2 tooltips, each with different title (h3) colors set. Place the objects nearby in the page so that you can quickly move your cursor between them. Now set fade to 500ms or more, to give yourself time to move between the two tooltips before either of them fades. The first tooltip should inherit the color scheme of the second. Your tooltip styling needs to reset if a new element is selected, not once fading has completed.
[jQuery] Carousel: How they do that?
http://www.merixstudio.com/ I like the carousel on the homepage above. I noticed when you drag the slider to the last element the carousel loads the last elements without sliding through the previous elements in the carousel. Does anyone know if this is a custom carousel they made or is there a plugin out there? Thanks in advance. Vincent
[jQuery] Re: Can't reproduce modal behavior - how to prevent clicks?
You could always use blockUI, but without the GUI portions. There are options for that. Or at the very least, you could try it to see whether the current problem is with your implementation or with your complex page. Good luck. - Richard On Thu, Apr 23, 2009 at 11:59 AM, ken jqu...@kenman.net wrote: No, although I have peeked at the source, but mainly because I'm not looking for any pseudo-window functionality; I just want to cancel clicks. This isn't something I'd think would warrant a full-blown plugin; I don't need any of the GUI portion of blockUI. I'm just confused because I know this technique works on a simple page, but what is it about a complex page that could totally screw-up the event system? On Apr 23, 10:51 am, Richard D. Worth rdwo...@gmail.com wrote: Have you tried the blockUI plugin? http://malsup.com/jquery/block/ - Richard On Thu, Apr 23, 2009 at 11:44 AM, ken jqu...@kenman.net wrote: I'm trying to prevent any mouse clicks on my page (if only for a short time), and I have this working on a very simple test page, but within my application (that has a very large DOM footprint) nothing is working. function noop(){ return false; } jQuery( document ).bind( 'click mousedown mouseup', noop ); I am running this code well after the DOM is loaded. I've tried binding to document, document.body, *, and window. I am not dealing with any frames. I've also tried unbinding any click/mousedown events prior to binding. I am currently using jQuery 1.2.6, although for fitness I tested this with 1.3.2 but I get the same results. What could I be doing wrong?
[jQuery] Re: Loading before dom = ready - Best Practices.
In a perfect world the things out of your control (ads, feeds, etc) would themselves be loaded after domReady into their placeholder markup. A slow loading Ad shouldn't be able to cripple the site while it loads, but anyway to expand on your topic. 4) Set a class on the Dom elements called 'jscript' or something that either hides or otherwise marks the content as not ready(disabled, grayed,etc) and once the Dom is ready use Javascript to remove the class 5) Redesign your pre javascript markup so it's somewhat usable and only use javascript to expand upon the behavior (this is really the best approach but not always practical if you use heavy script) I would recommend not trying to get tricky with snippets of script outside the domReady though. Too easy to have race conditions or otherwise hard to track down problems. On Apr 23, 12:13 pm, hedgomatic hedgoma...@gmail.com wrote: While virtually every site in existence trumpets using the jQuery DOM- ready shortcut as an absolute must, I've come across situations which I feel frustrate the user, particularly when using jQuery to create a navigational element. I often work on sites which are going to have a lot of external content (ads, feeds, analytics), and if even one of them is sluggish to load, none of my interactive elements are responsive for that time. There seem to be three options: 1] liveQuery (disadvantage: overhead) 2] popping a loading message over the whole page (disadvantage: ridiculous) 3] nesting an image inside the portion of the DOM we need, and using an onLoad event (disadvantage: poor semantics). Anyone else come across any novel ways around this seemingly under- discussed issue?
[jQuery] jQuery Validation Plugin - rule metadata documentation?
Are the options, usage and limitations for the jQuery Validation rules using metadata in markup, e.g., class=required date, documented anywhere? There is http://docs.jquery.com/Plugins/Validation#List_of_built-in_Validation_methods, but that is for setting up rules in the JS.
[jQuery] Re: Loading before dom = ready - Best Practices.
You could use $.getScript to load in the slow loading scripts. Any scripts loaded this way will be non-blocking (asynchronous). -- Brandon Aaron On Thu, Apr 23, 2009 at 2:13 PM, hedgomatic hedgoma...@gmail.com wrote: While virtually every site in existence trumpets using the jQuery DOM- ready shortcut as an absolute must, I've come across situations which I feel frustrate the user, particularly when using jQuery to create a navigational element. I often work on sites which are going to have a lot of external content (ads, feeds, analytics), and if even one of them is sluggish to load, none of my interactive elements are responsive for that time. There seem to be three options: 1] liveQuery (disadvantage: overhead) 2] popping a loading message over the whole page (disadvantage: ridiculous) 3] nesting an image inside the portion of the DOM we need, and using an onLoad event (disadvantage: poor semantics). Anyone else come across any novel ways around this seemingly under- discussed issue?
[jQuery] Re: jQuery Validation Plugin - rule metadata documentation?
The list applies to metadata as well. You can specify any method as an attribute, and where there are no parameters needed, use a class instead. Jörn On Thu, Apr 23, 2009 at 9:49 PM, Brad nrmlcrpt...@gmail.com wrote: Are the options, usage and limitations for the jQuery Validation rules using metadata in markup, e.g., class=required date, documented anywhere? There is http://docs.jquery.com/Plugins/Validation#List_of_built-in_Validation_methods, but that is for setting up rules in the JS.
[jQuery] traversing UL: Request for help
Request: I want to highlight every A within the parents of an object up to the base element of UL For example, this original code: ul lia href=/link/a/li lia href=/link/a ul lia href=/link/a/li lia href=/link/a ul lia href=/link/a ul lia href=/HOVER OVER THIS/a/li /ul /li lia href=/link/a/li /ul /li lia href=/link/a/li /ul /li lia href=/link/a/li /ul Should appear like so (assuming an addclass method): ul lia href=/link/a/li lia href=/ class=highlightlink/a ul lia href=/link/a/li lia href=/ class=highlightlink/a ul lia href=/ class=highlightlink/a ul lia href=/ class=highlightHOVER OVER THIS/a/ li /ul /li lia href=/link/a/li /ul /li lia href=/link/a/li /ul /li lia href=/link/a/li /ul I'm at a loss and I'm tired. Can you help a brother out? Basically the best path from A to Z Thanks for glancing at this. paul
[jQuery] Re: Bug? Jquery 1.3.2 - $.ajax + Firefor 3.0.8
Fixed with Firefox Version 3.0.9. I don't know if is something specifically related to the browser but yesterday it downloaded the new version and installed, and problem solved. The data is actually what i sended plus the js code: $.ajax({ type: 'POST', url: 'file.php', dataType: 'json', success: function(mensaje){ alert(dump(mensaje)); }, }); I use this for dump (maybe helps someone). http://www.openjs.com/scripts/others/dump_function_php_print_r.php Thanks, I will use try again with a not updated firefox again and see what's going on.