Re: [jQuery] Re: Autocomplete incompatible with certain struts-tiles-javascript apps
have a go with http://docs.jquery.com/Core/jQuery.noConflict 2010/1/15 j...@verax joti.bis...@gmail.com I found the problem. Its the $ sign ! The $ sign has a very special meaning in the jQuery framework. So if it is used in any other Javascript that doesnt use jQuery, it will be incompatible. So this means we should not use '$' in our code just because it looks cool ! Also, be very careful when you copy javascript plug-ins from the internet if you are already using javascript frameworks. They will most likely create an incompatibility. I have to now do either of the following: a) re-write all my javascript code to use jQuery b) write my own autocomplete javascript. On Jan 14, 5:24 pm, j...@verax joti.bis...@gmail.com wrote: Hi jQuery guru, I have an application based on struts and tiles. Validation is done by javascript at a global level. When I include my autocomplete code in my JSP page, the validation (checkValidation()) malfunctions with a javascript error - Object does not support this property or method at the line if (CCRDerrorContainer.hasChildNodes()). If I remove the autocomplete code from my JSP (business logic + autocomplete libraries) , the validation works as designed. Details of relevant code is provided below. Can anyone provide me with any clue as to how to resolve this problem ? == --- My JSP file --- %@ include file=../common/include.jsp % link rel=stylesheet type=text/css href=css/ jquery.autocomplete.css / script type=text/javascript src=js/autocomplete/lib/jquery.js/ script script type='text/javascript' src='js/autocomplete/ jquery.autocomplete.js'/script script var cols = []; // column mappings : 0=Last name, 1=First Name, 2=Title, 3 = Employee ID $().ready(function() { $('input#employeeLastName').flushCache(); $(#employeeLastName).autocomplete(jsp/common/getData.jsp? dataType=EmployeeName,{ minChars: 1, max: 1000, width: 400, delay: 1000, selectFirst: false, autoFill: false, cacheLength: 20, matchContains: false, matchSubset: true, mustMatch: false, matchCase: true, formatItem: function(row, i, max) { cols = row[0].split(%); return i + / + max + : + cols[0] + , + cols[1] + ( + cols[2] + ); }, formatMatch: function(row) { cols = row[0].split(%); return cols[0] + , + cols[1]; }, formatResult: function(row) { cols = row[0].split(%); return cols[0] + , + cols[1] + ( + cols[2] + ); } }); $(#employeeLastName).result(function(event, row, formatted) { if (row) { cols = row[0].split(%); $(this).next().val(cols[3]); } }); }); /script tiles:importAttribute name=task / tiles:importAttribute name=action / tiles:importAttribute name=displayAction / tiles:importAttribute name=showArchived / style type=text/css @import ${pageContext.request.contextPath}/css/employee/select.css; /style h1 fmt:message key=employee.label.title.select / /h1 hr / div id=employeeSelect tiles:insert definition=successMessages / tiles:insert definition=failureMessages / ccrd:errors / html:form action=${action} method=post label for=employee id=employeeLbl fmt:message key=employee.text.selectEmployee / span class=taskfmt:message key=${task} /:/span /label html:text
Re: [jQuery] Is treeview plugin using some other plugin for cookie persistence
the cookie plugin in the download not working for you? 2010/1/12 epitka exptrade2...@yahoo.com If so, which plugin is it using? I cannot find anything in docs.
[jQuery] jQuery 1.4 LiveQuery
hi, I've been using LiveQuery a fair bit in my projects, I've just tried updating to 1.4, and it appears to have broken it. This http://pastie.org/778941 is the kind of thing I'm doing. Is there a way around this with 1.4? Thanks in advance, Jon -- jon bennett - www.jben.net - blog.jben.net
Re: [jQuery] How to apply limits to an animation
have a look at the jCarousel plugin - i think that should do what you need. http://sorgalla.com/jcarousel/ Jon 2010/1/9 JQNovice i...@chamonixmountainguides.com I am very new to JQuery but so far very happy with ease of use. I have created a series of thumbnails that slide as the left, right buttons are clicked: http://www.lisaauer.com/jquery_imageslide/ I want the images to slide left or right only so far that there are always images filling the slide div and then stop. i.e. no white space. Or, Create a loop of images such that they keep repeating. Any assistance appreciated. Please remember you are talking with a novice! Thanks.
Re: [jQuery] Can we use jquery for paging and sorting in asp.net 2.0 ?????
take a look at jqGrid http://www.trirand.com/blog/ I rarely use asp these days but i think there is a component available. good luck Jon 2010/1/8 Jackson...!!! jacksoncouti...@gmail.com Hello All, Using jQuery can we include asp.net 2.0 gridview, paging sorting and in-place editing. Waiting for a favorable response. Thanking you, Jackson C.
[jQuery] Re: No reaction with $('a').click(), OK with dispatchEvent(...)
Hi, At the moment I'm not so interested in the right/smart way to write an a tag. It's more interesting to me to see what the jQuery click() function can and cannot do, and it could also be interesting to know why it fails where my clickAt(...) works. I have now extended my test page http://folk.uio.no/jkleiser/test/jq-test.html with two new a variants: one (#a2) new-school that uses 'onclick', and one (#a3) that links to this Google Groups page. With the latter I observe the same difference as with #a1: my clickAt($('#a3')[0]) works, but $('#a3').click() doesn't. Bug or feature? /Jon On Nov 19, 11:36 pm, Olaf Bosch olaf.bo...@t-online.de wrote: Jon schrieb: Hi, I have an element like this: a id=a1 href=javascript:doSomething ();#a1/a However, when I do this: $('#a1').click(); ... then my doSomething() do not get called. Why? Try the jQuery-Way: a id=a1 href=##a1/a $('#a1').click( function() { doSomething(); return false; }); -- Viele Gr e, Olaf --- olaf.bo...@t-online.dehttp://olaf-bosch.de/http://ohorn.info/http://www.akitafreund.de/ ---
[jQuery] Re: No reaction with $('a').click(), OK with dispatchEvent(...)
Hi, I'm not quite sure what you try to show me with that $('#a3').click (...stuff...) below, but I can tell you what I just found out: The difference I've mentioned between my clickAt($('#a1')[0]) and $ ('#a1').click(), and also with #a3, occurs in Safari and Opera, but in Firefox (3.0.3 and 3.5.5) my clickAt(...) does no more than $ (...).click(). In IE7 my clickAt(...) just gives me an [object Error]. What a mess! /Jon On Nov 20, 11:18 am, Olaf Bosch olaf.bo...@t-online.de wrote: Jon schrieb: and one (#a3) that links to this Google Groups page. With the latter I observe the same difference as with #a1: my clickAt($('#a3')[0]) works, but $('#a3').click() doesn't. Bug or feature? Sorry I can't follow you. I added this to Firebug on your Testpage: $('#a3').click( function() { return false; }); And then Click on #a3 and nothing -- Viele Gr e, Olaf --- olaf.bo...@t-online.dehttp://olaf-bosch.de/http://ohorn.info/http://www.akitafreund.de/ ---
Re: [jQuery] Re: getjson request an unavailable page
On Wed, 18 Nov 2009, Humpty Dumpty wrote: Thanks, I though that there was a JSON solution; ok, I will try by the use of ajax but nobody that used getjson had this problem? As a matter of fact, I just did. As I understand it $.getJSON() seems to be just a wrapper around an $.ajax() request. So I used $.ajaxSetup() to define an error handling routine. see: http://stackoverflow.com/questions/572991/jquery-getjson-doesnt-trigger-callback and: http://docs.jquery.com/Ajax/jQuery.ajax
[jQuery] No reaction with $('a').click(), OK with dispatchEvent(...)
Hi, I have an element like this: a id=a1 href=javascript:doSomething ();#a1/a However, when I do this: $('#a1').click(); ... then my doSomething() do not get called. Why? If I make my own click function, like this: function clickAt(targetElement) { var evt = document.createEvent(HTMLEvents); evt.initEvent(click, true, true); return targetElement.dispatchEvent(evt); } ... and call it this way: clickAt($('#a1')[0]); ... then my doSomething () do get called. If you like, you can try it out here: http://folk.uio.no/jkleiser/ test/jq-test.html /Jon
[jQuery] Queries on document in child window
Hi, If I open some foreign document in child window using window.open ('http://...', ...), is there some easy way I can make jQuery queries on that foreign document, using the jQuery that's loaded into my parent (opener) window? I know it's possible for my parent window to make the child window load it's own jQuery, if it didn't already have it, and use that, but that is not as easy as I could prefer. /Jon
[jQuery] Re: Social media plugin
yes. http://github.com/kswedberg/jquery-socialize 2009/10/22 Ricardo ricardo.soaresdel...@gmail.com I've visited this site(http://www.intomobile.com/2009/10/09/hands-on- the-nokia-n900-at-ctia-fall-2009.htmlhttp://www.intomobile.com/2009/10/09/hands-on-%0Athe-nokia-n900-at-ctia-fall-2009.html) and there is an interesting feature to spread the link in social sites like facebook, twitter and others (just point your mouse to the article image). I've found that the effect is provided by the Meebo site. Is there any jquery plugin that do something similar to the linked site above? Thanks in advance.
[jQuery] Re: In a table, I add a new row(tr string append to the table), It can not action some even.
Give live ago instead of click. something like: $(document).ready(function(){ $(.up,.down).live(click,function(){ var row = $(this).parents(tr:first); if ($(this).is(.up)) { row.insertBefore(row.prev()); } else { row.insertAfter(row.next()); } }); Jon 2009/10/21 Mead Lai laiqi...@gmail.com: I am very newer to JQuery, beg U pardon. While, in every table row I have two link button : td a href=# class=upUp/a a href=# class=downDown/a /td And I click up the table row tr will move up, the down is same move down. But, I add a row into table use append string to table, like following: $(#btn_add).click(function(){ $(#myTable tbody).append(trtd5Five/tdtdFiveinput type='text' name='tb_class'/tdtdFive/tdtda href='#' class='up'Up/a =a href='#' class='down'Down/a/td/tr); }); The appended table row, can not response the even, where I click the up and down link. How to make the appended table-row bind the click even? Thanks in advance, All source is below... == !doctype html head titleTest/title script type=text/javascript src=../../jquery-1.3.2.js/script script type=text/javascript $(document).ready(function(){ $(.up,.down).click(function(){ var row = $(this).parents(tr:first); if ($(this).is(.up)) { row.insertBefore(row.prev()); } else { row.insertAfter(row.next()); } }); $(#btn_show).click(function(){ var $myTable = $(#myTable); $myTable.find(tr).each(function(i){ alert($(this).find(input).val()+==+i); }); }); $(#btn_add).click(function(){ $(#myTable tbody).append(trtd5Five/tdtdFiveinput type='text' name='tb_class'/tdtdFive/tdtda href='#' class='up'Up/a =a href='#' class='down'Down/a/td/tr); }); $(#btn_get_one).click(function(){ var $myTable = $(#myTable); $myTable.find(tr).each(function(i){ alert($(this).find(input).val()+==+i); }); }); }); /script /head body div class=demo-description input id=btn_show type=submit name=Submit value=show the order input id=btn_add type=submit name=Submit value=add a row input id=btn_get_one type=submit name=Submit value=get first row brdiv id=infohell/div br table id=myTable tbody tr td1One/td tdType input type=text name=tb_class value=mead/td tdIsDisplayinput name=cb_is_show type=checkbox value=/td td a href=# class=upUp/a a href=# class=downDown/a /td /tr tr td2Two/td tdTwo input type=text name=tb_class value=lai/td tdTwo input name=cb_is_show type=checkbox value=/td td a href=# class=upUp/a a href=# class=downDown/a /td /tr tr td3Three/td tdThree input type=text name=tb_class value=princess/td tdThree/td td a href=# class=upUp/a a href=# class=downDown/a /td /tr /tbody /table /div !-- End demo-description -- /body /html
[jQuery] Wonder girls “nobody” English version
** http://www.ziddu.com/download/6909515/nobodyen.wmv.html
[jQuery] WG Performance in NY
** http://www.ziddu.com/download/6909512/wonderny.wmv.html
[jQuery] Chubby jones interview : the wonder girls
http://www.ziddu.com/download/6909513/interviewwondergirl.wmv.html
[jQuery] Re: How to access iframe window?
You can chain... $(iframe)[i].contents().find('#selector') Jon 2009/10/13 Christophe christophe.humb...@gmail.com: How can I access an iframe window using jQuery? The only iframe related stuff I have found is contents(), which allows me to access the DOM in the iframe. For now, I am using $(iframe)[i].contentWindow, but it seems to be IE only. Thanks!
[jQuery] Re: How to access iframe window?
if you are after elements in the top level frame you can access them like: $('#selector', parent.document.body) 2009/10/13 Christophe christophe.humb...@gmail.com: Jon, find will allow me to access DOM elements like head, body, etc. What I need to access is the iframe window. Christophe On Oct 13, 6:02 pm, Jon Banner banali...@googlemail.com wrote: You can chain... $(iframe)[i].contents().find('#selector') Jon 2009/10/13 Christophe christophe.humb...@gmail.com: How can I access an iframe window using jQuery? The only iframe related stuff I have found is contents(), which allows me to access the DOM in the iframe. For now, I am using $(iframe)[i].contentWindow, but it seems to be IE only. Thanks!- Hide quoted text - - Show quoted text -
[jQuery] Re: Jcarousel Add Link
add links to your item list something like: {url: http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg;, title: Flower1, link:http://wherever.com/}, and then update the helper function to something like: function mycarousel_getItemHTML(item) { return 'a href='+item.link+'img src=' + item.url + ' width=75 height=75 alt=' + item.url + ' //a'; }; Jon 2009/10/9 cMantilla cmantill...@gmail.com I would like to use the carousel at http://sorgalla.com/projects/jcarousel/examples/dynamic_javascript.html My company needs a product slider and it works well with a few changes to the CSS. I am having trouble however adding links to the images. If someone could show me a function or how to declare a href's in this code, it would be greatly appreciated. Mantilla
[jQuery] Re: jQuery Right click menu
you must have asked your question outside of normal support hours. have you looked into this plugin? http://abeautifulsite.net/notebook_files/80/demo/jqueryContextMenu.html 2009/10/7 donovan78 djalmabri...@gmail.com Hi , please whymy question is not answer ? something is not clear ? thanks.
[jQuery] Re: Notre Dame Inspired Jquery -- Exists?
one of the carousel plugins could do it for you. http://sorgalla.com/jcarousel/ http://www.gmarwaha.com/jquery/jcarousellite/ depending on your project specific needs. best. Jon 2009/10/6 Kevin Jones kevin...@gmail.com bump On Oct 1, 10:43 am, Kevin Jones kevin...@gmail.com wrote: http://www.nd.edu/ Their homepage has a carousel-ish type of feature. Does anyone know if this exists already with a jQuery plugin? I don't know if our project has the allotted time for me to make one from scratch, so I was curious if it existed or could be easily adapted from somewhere else. If anyone has any insight, it would be very helpful. It doesn't need video or anything inside, just the three rotating images on click, coming in front of one another. Thanks, Kevin
[jQuery] Re: Callback Function had a look but don't get it
the link should have it's normal state and actions when you don't return false, as in the example code you provided. If you want to add a call back to fire after the fade out: $(function() { // document is ready for load $('a').click(function() { $('.box').fadeOut(slow, function(){ callback(); }); }); }); regards, Jon 2009/10/1 jessie mi...@optusnet.com.au Ok i'm nearly there LOL i have the link and a box which i want to foundOut as my function. All works dandy now :) But whatif i wanted after i clicked on the link to go to its normal state? Well i went to the jquery site but i don't think its designed for TRUE beginners like myself It talks about Callback function and its displayed like this function callback() { this; // dom element } So here is my code and where do i put this callBack? and do i need to add a class to it? $(function() { // document is ready for load $('a').click(function() { $('.box').fadeOut(slow); }); }); Jessie
[jQuery] Re: compare variables
make friends with regular expressions. http://en.wikipedia.org/wiki/Regular_expression 2009/9/30 Poloman bigtrouble1...@gmail.com I have varA = com and varB=com55 or ton2 or son1.9 or whatever values... I want to do a comparison if the prefix of varB = com, which is varA, then do something. How can i write the code for this ?
[jQuery] Re: Tablesorter problems
Hi Mike, it looks as if you have copied and pasted some illegal characters in to your demo page. Try removing these and see if that helps. Best, Jon 2009/10/1 Mike michael.dimm...@virgin.net Is there no one that can help? On Sep 30, 4:26 pm, Mike michael.dimm...@virgin.net wrote: Hi I have recently come across the tablesorter 2.0 for jquery and have decided to use it on my website. I have the examples to work etc. however I would like to exclude the first column of my table from being sorted and just to remain static irrespect of the other columns being sortable. I have found this : http://stackoverflow.com/questions/437290/exclude-a-column-from-being... which is exactly what I needed however when pasting it into my test web page I get line 16 parse error (missing before statement). I have no previous experience of knowledge of jQuery so I would appreciate if someone could look at my test page and see what the problem is: http://www.freebetsextra.co.uk/tablesorter/tests/freebet3.html. This is the widget I am trying to use: $(function() { // add new widget called indexFirstColumn $.tablesorter.addWidget({ // give the widget a id id: indexFirstColumn, // format is called when the on init and when a sorting has finished format: function(table) { // loop all tr elements and set the value for the first column for(var i=0; i table.tBodies[0].rows.length; i++) { $(tbody tr:eq( + (i - 1) + ) td:first,table).html(i); } } }); $(table).tablesorter({ widgets: ['zebra','indexFirstColumn'] }); });
[jQuery] Re: Problem with fade-effects and IE8
What version of jQuery are you using? I have not had problems with IE8 using version 1.3.2, and i've just checked some sites that i've previously worked on using 1.2.6, and they don't seem to have any problems with fade in or fade out. Maybe you have a beta version of IE8? Jon 2009/9/30 dirknibleck paul.ship...@clickonce.ca I am experiencing the same issue with slideToggle and toggle in Internet Explorer 8. Were you able to find a resolution? On Sep 8, 2:08 am, Boolace bool...@googlemail.com wrote: Hi, I've a problem with the fadeIn() and fadeOut()-commands of jQuery usingInternetExplorer8. Firefox, Opera, Safari and IE up to version 7 works fine. I'm not getting an error or something from the console, the effect is simply not executed. The elemtent is staying fixed and doesn't hide and vice verca. Any Idea if this is caused in jQuery? Anybody else who has this problems? Thanks and greetings, Boolace
[jQuery] Re: reservation booking system
have you checked out the UI? http://jqueryui.com/ rgds. Jon 2009/9/30 Eesti Mate e...@t35t.in-berlin.de Hello List, I'm looking for some modules to realize a reservation and booking system (jQueryDjango), preferably with a nice calendar interface. I did some research today, but didn't found what I was looking for... maybe because I'm new to jQuery/Django, maybe because I'm blind, or maybe because there is nothing of any use around?! It would be great if you Guys 'n' Girls could share some ideas regarding suitable modules etc. Cheers Eesti
[jQuery] Re: jCarouselLite - set to scroll if...
No idea if this will work for you. get the height of the content you wish to scroll. http://docs.jquery.com/CSS/height if its greater than the height of your carousel item, add the auto call to the plugin... presume that you have seen all this http://www.gmarwaha.com/jquery/jcarousellite/ best, Jon 2009/9/30 john.mbiddu...@googlemail.com john.mbiddu...@googlemail.com can anyone help here? On 29 Sep, 16:59, john.mbiddu...@googlemail.com john.mbiddu...@googlemail.com wrote: hi, I am using the jCarouselLite which I got from here in my webpage and would like to be able to start the scroll if the text that is inside the div falls outside the height of it?! Please help!
[jQuery] Re: How do I stop my div from sliding?
as soon as i scroll your demo, the div disappears off the top of the page in firefox and IE7 From the behaviour you describe i think this might be useful to you http://www.cssplay.co.uk/layouts/fixed.html best. Jon 2009/9/29 jpearson311 jpearson...@hotmail.com Hi all. JQuery noob here. I'm building a site right now that has a left column navigation and the navigation is nested inside a div, which is nested inside a table cell (i.e., td). I'm using JQuery to make it so when the user scrolls down the page, the div slides down with smoothly and always stays at the top of the page. I have this working just fine, but when I change resolutions (i.e., 1024x768), the div scrolls over the bottom of the page, which is what I don't want. How can I calculate in order for the div to know when it hast reached the bottom of the table cell? I tried using outerHeight to calculate the height of the table cell and then subtracting the height of the div from it, but I'm clearly doing it wrong because it's still not working. You can view the page I'm referring to at www.ts24.com/watersedge/overview.cfm. The JS code I'm using is below. If anyone has any pointers, I'd really appreciate it. Thanks! Jesse var name = #scroller; var menu_top_limit = 0; var menu_bottom_limit = $('#holder #scroller').outerHeight() - 560; var menu_top_margin = -15; var menu_shift_duration = 500; var menuYloc = null; /// $(window).scroll(function() { // Calculate the top offset, adding a limit offset = menuYloc + $(document).scrollTop() + menu_top_margin; // Limit the offset to 0 pixels... // This keeps the menu within it's containing TD boundaries if(offset menu_top_limit){ offset = menu_top_limit; // Give it the PX for pixels: offset += px; } /*else if(offset menu_bottom_limit){ offset = menu_bottom_limit; offset += px; }*/ // Animate: $(name).animate({top:offset}, {duration:menu_shift_duration,queue:false}); });
[jQuery] Mailing list for general JavaScript discussion?
Hi all, I know it's a bit off-topic, but which mailing list do you use for general JavaScript discussion. As we know, JavaScript is an OOP language which has getting more and more attention on a daily basis from programmers and designers. Where could I have in-depth discussions on JavaScript, Ajax, OOP, server-side JavaScript, etc...? Jon
[jQuery] Re: Changing a class name without clicking
you'll need an event to attach your function call to, whether that's document ready or click or... you might also find toggleClass http://docs.jquery.com/Attributesto be useful here Jon 2009/9/24 Lleoun adoming...@vivocom.es Hi all, I have the following: div class=unselected content/div I want to change unselected into selected when calling a function. The ways I'm finding to do a class name change is using a clicking: $('.unselected').click(function(){ $('.selected').attr('class','unselected'); $(this).attr('class','selected'); }); But I don't want to click, I need to do it by calling a function .. how can I do that? Thanks a lot !
[jQuery] Re: How can i add Buttons?
jCarousel ?? did you try this? http://sorgalla.com/projects/jcarousel/examples/static_controls.html 2009/9/21 Pesimist pckopat.fene...@gmail.com hello everyone. i have a problem. i wanna add left and right buttons but i couldn't i have tried long time so really i need. i am looking for like this for example: a href=# id=mycarousel-prevPrev/a or a href=# id=mycarousel-previmg src=images/prev.gif/a i wanna put like this buttons. please help me.
[jQuery] Re: More Jquery calls on a page
You should be able to do this without problem. http://www.learningjquery.com/2006/09/multiple-document-ready 2009/9/23 Topflysecurity konnektgra...@gmail.com hi. i always seem to have problems with this so i thought i would join here and ask. i cant use two different jQuery calls on the same page in two different script tags, something like this the reason i need to work like this is because i do asp.net... so i got the first one on my masterpage and the other on the page that needs it.. script type=text/javascript $(document).ready(function() { SOME JQUERY }); /script script type=text/javascript $(document).ready(function() { SOME JQUERY }); /script
[jQuery] Re: chaining animations and pausing for each step
Have you had a go with queue? http://docs.jquery.com/Effects/queue Rgds. Jon 2009/9/10 D A dali...@gmail.com In pseudo code, here's what I'm trying to do with some text: shrinkText.changeText.EnlargeText. The jQuery I'm using for this: $('span#calendarNumber').animate({ color: '#999', fontSize: '12px' }, 500 ).html($('#calculatorSampleInPopup1').val()).animate({ color: '#900', fontSize: '40px' }, 2500, 'easeOutElastic' ); What happens visually upon triggering this is this: - HTML content changes - text shrinks - text enlarges I think what is happening is that the first animation is suppose to span 500 (miliseconds?) but jQuery doesn't pause for that, it just starts the animating and goes immediate to the second event which is to change the text. In otherwords, I think it's triggering correctly, it's just not producing the visual effect I want. Is the solution to put a pause of some sort between the first two events? If so, what's the proper method? -DA
[jQuery] Re: How to access variables in page loaded with $.load?
I'm not really sure what you're trying to do here... if you want a JS variable to persist between pages you'll have to pass it in a cookie, or as part of a query string and then retrieve it on the load of the second page. It's probably easier to do this server-side. Jon 2009/9/9 Matt Wilson m...@tplus1.com I have a page /a that has a line var aaa = 99; And I load that page /a into a div on another page. In the other page, I want access to that variable aaa. I tried this: $(#adiv).load(/a, function () { console.log(aaa); }) I get an error that aaa is undefined. What am I doing wrong?
[jQuery] Re: Cycle: replace slide in running slideshow?
Mike, Thanks for this. I did find a solution by setting a flag for the first time through the cycle since there were other things too I wanted to happen only on the first time through. After the #title element is shown, I simply replaced its html with a different image and content. A stripped down version looks something like this: jQuery(document).ready(function($){ var firstTime = true; $('#cycle').cycle({ fx:'fade', speed:1500, timeout:7000, delay: 5000, before: doBefore }); function doBefore() { if (firstTime == true){ var i = $(.slide).index(this); if (i == 1){ $(#title).html(img src='newimage.jpg' / + div class='caption'foobar/div); firstTime = false; }; }; }; }); This seems to work. I gather setting such a global variable is regarded as bad form, but in such a small application it seemed harmless. Your solution seems to avoids this. Thanks again, and thanks too for your generosity in developing this very generally useful plugin. Jon On Sun, 30 Aug 2009, Mike Alsup wrote: Is there a way to replace the first slide in a running slideshow such that it's shown only once?? Here's an example of something similar - might give you some ideas: http://www.malsup.com/jquery/cycle/title.html
[jQuery] Cycle: replace slide in running slideshow?
Is there a way to replace the first slide in a running slideshow such that it's shown only once?? I've been trying variations on something like this with no success. The element is replaced, but cycle doesn't show it. function doBefore(){ var i = $(.slide).index(this); if (i == 1){ $(#first).replaceWith(div class='slide' id='repl' style='position: absolute; top: 0px; left: 0px; display: none; z-index: 5; opacity: 0; width: 640px; height: 640px;'img src='replacement-image.jpg' /div class='caption'foobar/div/div); } }
[jQuery] Re: jCarousellite: is it possible to remember a slide's position?
you could try using the afterEnd callback function to capture the position of the carousel and store this in a cookie, and then pass this variable back in as the start position for the carousel. 2009/8/21 noahT nippon...@gmail.com Today a client asked me if it's possible to remember a slide's position after clicking a link within a carousel. Basically, he hates how the carousel resets to slide 0 upon reload. Are there any suggestions on how to accomplish this? My guess is to load the link in a pop-over iFrame window similar to Lightbox.
[jQuery] Re: Checkbox perpetually marked as checked
double == in your if statements might do the job. 2009/8/19 Nick Moy nick@gmail.com When the if else statements are removed, they are not perpetually checked. On Aug 19, 4:34 pm, labbit nick@gmail.com wrote: Hello, I'm trying to write an if else statement in javascript so that when a check box is checked, a table will appear, and when it is checked again, another box will appear. However, the checkbox is constantly marked as checked, and I do not know why. I did not set any checked attritube to false or true. What gives? function GetStoryPoints() { var ownerCheck; var creatorCheck; if (document.getElementById(ownCheck).checked = true) ownerCheck = true; else ownerCheck = false; if (document.getElementById(createCheck).checked = true) creatorCheck = true; else creatorCheck = false; if (ownerCheck creatorCheck) { $.post('/StoryPoint/ListSpecific?retrieveOwned=' + ownerCheck + 'retrieveCreated=' + creatorCheck + 'creatorID=' + $ (#UserList option:selected).attr(value), null, function(data) { $(#storyPointDetail).html(data); }, html); } else if (ownerCheck !creatorCheck) { $.post('/StoryPoint/ListSpecific?retrieveOwned=' + ownerCheck + 'retrieveCreated=' + creatorCheck + 'creatorID=' + $ (#UserList option:selected).attr(value), null, function(data) { $(#storyPointDetail).html(data); }, html); } else if (!ownerCheck creatorCheck) { $.post('/StoryPoint/ListSpecific?retrieveOwned=' + ownerCheck + 'retrieveCreated=' + creatorCheck + 'creatorID=' + $ (#UserList option:selected).attr(value), null, function(data) { $(#storyPointDetail).html(data); }, html); } }
[jQuery] Re: How to hide pop is blur
$('#show').click(function(){ $('#popup').fadeIn(slow, function(){ $(other things).click(function(){ $('#popup, #show').hide(); }); }); }); 2009/8/13 David .Wu chan1...@gmail.com There is a button control a div show or not, I want when you click other things then the div will disappear too exclude div itself and also the show button, how to do that? [html] html . input type=button id=show value=show div id=popup style=display: none; .. /div /html [JavaScript] script $('#show').click(function(){ $('#popup').toggle(); }); /script
[jQuery] Re: jCarousel External Control as Pagination
without seeing your code it's a bit of guess work... you could try this use the callback function initCallback assuming that you are showing 5 items and your external control has id = btn-show-next, attaching an event something along these lines ought to help you. *$('#btn-show-next').click(function(){ carousel.options.scroll = 5; carousel.next(); return false; });* post your code if you need more help. Jon 2009/8/4 Gingah ole...@gmail.com Hi there (tried posting this earlier without result), I have a couple of problems using jCarousel, and was hoping someone here might lead me to a solution. First of all, can I change the way the External Control function works? I am guessing that I only need to edit the javascript file, but having little knowledge of it, I chose not to. What I want to do, is use the External Controls as a pagination, so rather than being a navigation for each image, I would like it to navigate from one page of visible images, to another. More or less, I accomplished it by setting the value inside the li/ li to the number I wanted to navigate to. However, this resulted in ridiculous number always increasing by the number of visible items (have a massive amount of images loaded). So really, the question is: How can I navigate to a specific image in the carousel using a onclick function? Which brings me to the other problem, the External Controls behave as a list of navigation-buttons. If my carousel shows 500 images, it will generate 500 buttons for navigating. How can I automatically shorten it (as the Pagination Plugin does; http://d-scribe.de/webtools/jquery-pagination/demo/demo_options.htm)? Thinking about it, making such a pagination would be much easier if I knew how to solve the first problem. Any good ideas or solutions? Please write them down!
[jQuery] My messages don't show?
What could I be doing wrong? I've joined the group, posted a message (tried it twice)... but it doesn't show? Jon Jackson (JimmyHill, jonj...@googlemail.com)
[jQuery] Re: jcarousel - malware-adware?
set your dimensions as in the stylesheet included in the documentation. http://sorgalla.com/projects/jcarousel/lib/jquery.jcarousel.css 2009/7/19 icpep icpep@gmail.com MorningZ wrote: It's called a false positive... where Spybot *thinks* it's something malicious, but it isn't... if it's really that much a concern to you, and in no should it, then i would suggest not using the plugin On Jul 19, 11:18 am, gauthier2022 gauthier2...@gmail.com wrote: I had malware/adware two days ago. Scanned with Spybot search and destroy but now mybrowsers are slow (IE and Firefox) plus i get a window saying: jcarousel No width/height set for items. Tjis will cause an infinite loop. What caused this and how do i correct the problem? Thanks to the good soul who helps me out...! Jean-Pierre gauthier2...@sympatico.ca If you really needed the plugin then you can uninstall the spybot or either way. Like what the spybot suggest there is an infinite loop which is causing the slowing down of your computer. Try also looking for the width and height and set some values.
[jQuery] Re: TreeView Problems
i had a similar problem this morning. I updated the call to the write cookie to include a path (i was getting a cookie written for each page in the app) line 172 in the uncompressed plugin. $.cookie(settings.cookieId, data.join(), { path: '/' } ); Jon 2009/7/6 Keith keithhen...@gmail.com Here is the menu that I'm trying to implement. I'm not sure what I'm doing wrong, I've followed all of the demos and still the menu is not properly setting the cookie, which is causing the menu to open incorrectly when the page loads. Please let me know if there is something wrong in my code or if anyone has a suggestion that I can try out that would be great. Thanks for your help. head link rel=stylesheet href=/mars/css/jquery.treeview.css / link rel=stylesheet href=/mars/css/screen.css / script src=/mars/js/lib/jquery.js type=text/javascript/script script src=/mars/js/lib/jquery.cookie.js type=text/javascript/ script script src=/mars/js/jquery.treeview.js type=text/javascript/ script script type=text/javascript jQuery.noConflict(); // fourth example jQuery(document).ready(function(){ // fourth example jQuery(#black, #gray).treeview({ control: #treecontrol, persist: cookie, cookieId: treeview-black }); }); /script /head body div id=main div id=treecontrol a title=Collapse the entire tree below href=#img src=/mars/ img/nav/minus.gif / Collapse All/a a title=Expand the entire tree below href=#img src=/mars/img/ nav/plus.gif / Expand All/a a title=Toggle the tree below, opening closed branches, closing open branches href=#Toggle All/a /div ul id=black class=treeview-black li spanCustomer Selection/span ul li a href=/mars/jsp/viewflightcalcrit.jsp Flight Search/a /li li a href=/mars/index.jsp?viewdash=1Dashboard/a /li /ul /li /ul ul id=gray class=treeview-gray li spanContrax/span ul li a href=/mars/contrax/contractselection.jsp? isRenewal=1Contracts (Renewals)/a /li li a href=/mars/contrax/systemselect.jspNew Contract/Estimate/ a /li /ul /li /ul /div /body Keith
[jQuery] Re: trigger validation by input:button
I have tried unsuccessfully to implement this solution, but I keep getting the error: validator is not defined if (validator.element(#btnNext1)) { Here is my code: head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / script type=text/javascript src=/scripts/jquery/ jquery-1.3.2.min.js/script script type=text/javascript src=/scripts/jquery/jquery-validate/ jquery.validate.min.js/script script type=text/javascript $(document).ready(function(){ $.validator.addMethod(step, function(value, element, param) { var isValid = true; var elements = $(param).find(:input) .not('input[type=hidden]') .not(:submit, :reset, :image, :button, [disabled]); alert(elements.length); for (var i = 0; i elements.length; i++) { if (!this.element(elements[i])){ isValid = false; } } return isValid; }, ); $(#testForm).validate(); $(#btnNext1).click(function() { if (validator.element(#btnNext1)) { $(#step_1).hide(); $(#step_2).show(); } }); }); /script titleUntitled Document/title /head body form id=testForm div id=step_1 div id=step1control input name=name type=text class=required / /div button id=btnNext1 value=Next class={step:'#step1control'} nextbuttonNext/button /div div id=step_2 pStep 2/p /div /form /body On Jun 24, 12:56�am, Mac amcint...@bigmate.com.au wrote: Hi Matt I came across the same issue when I tried to create a wizard. I overcame this by doing the following: Write a validator extension that looks something like this and use the add method to add it: $.validator.addMethod(step, function(value, element, param) { � � var isValid = true; � � var elements = $(param).find(:input) � � .not('input[type=hidden]') � � .not(:submit, :reset, :image, :button, [disabled]); � � for (var i = 0; i elements.length; i++) { � � � � if (!this.element(elements[i])){ � � � � � � isValid = false; � � � � } � � } return isValid; }, ); Attach this method to the button itself and pass it the elementid as param like so: button id=btnNext1 value=Next class={step:'#step1control'} nextbuttonNext/button The step1control can be a div containing all the elements that you want to validate. Then you need to run some code in the click event of the button to check the button( and thus the step) is valid. eg: $(#btnNext1).click(function() { � � � � � � if (validator.element(#btnNext1)) { � � � � � � � � $(#step_1).hide(); � � � � � � � � $(#step_2).show(); � � � � � � } � � � � }); I have created wizards like this with the validator plugin multiple times and seems to work okay!!Hope it helps!! On Jun 12, 3:58�pm, Matt sean...@gmail.com wrote: Hi, I have been working on a big form and using jquery plug-in (wizard form) to divide tit into small subforms. Now, I am trying to integrate the Validation plugin to deal with the validation and come up with an issue. I run validation on subforms which contains two buttons(back, next). Those 2 buttons are input:button type but not input:submit. I realise the Validation plug-in would trigger the validation on submit event. Is there any way I can modify the code so that it could handle my requirement? Having a look on the multipart demo which is the exact scenario I am dealing with. However, the page below is not working. I tried on both IE and FF. http://jquery.bassistance.de/validate/demo/multipart/ Please advise. Cheers, Matt
[jQuery] Re: trigger validation by input:button
So I got the error to go away by using: var validator = $(#testForm).validate(); But now the problem is that the button proceeds to the next step, even if there are errors. I can't get it to not display #step_2 when there are errors. It was suggested that I try using class={required:true} on the input instead of class=required, but that didn't work. I don't fully understand what the added method is doing, but it seems to me like it's not being called or something. The statement if (validator.element(#btnNext1)) always comes out true, even when I tried explicitly setting var isValid = false; in the method. I've uploaded a test page: http://www.angelo.edu/webservices/validateTest.html. Any help would be greatly appreciated. On Jul 6, 3:14 pm, Jon jon.wil...@angelo.edu wrote: I have tried unsuccessfully to implement this solution, but I keep getting the error: validator is not defined if (validator.element(#btnNext1)) { Here is my code: head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / script type=text/javascript src=/scripts/jquery/ jquery-1.3.2.min.js/script script type=text/javascript src=/scripts/jquery/jquery-validate/ jquery.validate.min.js/script script type=text/javascript $(document).ready(function(){ $.validator.addMethod(step, function(value, element, param) { var isValid = true; var elements = $(param).find(:input) .not('input[type=hidden]') .not(:submit, :reset, :image, :button, [disabled]); alert(elements.length); for (var i = 0; i elements.length; i++) { if (!this.element(elements[i])){ isValid = false; } } return isValid; }, ); $(#testForm).validate(); $(#btnNext1).click(function() { if (validator.element(#btnNext1)) { $(#step_1).hide(); $(#step_2).show(); } }); }); /script titleUntitled Document/title /head body form id=testForm div id=step_1 div id=step1control input name=name type=text class=required / /div buttonid=btnNext1 value=Next class={step:'#step1control'} nextbuttonNext/button /div div id=step_2 pStep 2/p /div /form /body On Jun 24, 12:56 am, Mac amcint...@bigmate.com.au wrote: Hi Matt I came across the same issue when I tried to create a wizard. I overcame this by doing the following: Write a validator extension that looks something like this and use the add method to add it: $.validator.addMethod(step, function(value, element, param) { var isValid = true; var elements = $(param).find(:input) .not('input[type=hidden]') .not(:submit, :reset, :image, :button, [disabled]); for (var i = 0; i elements.length; i++) { if (!this.element(elements[i])){ isValid = false; } } return isValid; }, ); Attach this method to thebuttonitself and pass it the elementid as param like so: buttonid=btnNext1 value=Next class={step:'#step1control'} nextbuttonNext/button The step1control can be a div containing all the elements that you want tovalidate. Then you need to run some code in the click event of thebuttonto check thebutton( and thus the step) is valid. eg: $(#btnNext1).click(function() { if (validator.element(#btnNext1)) { $(#step_1).hide(); $(#step_2).show(); } }); I have created wizards like this with the validator plugin multiple times and seems to work okay!!Hope it helps!! On Jun 12, 3:58 pm, Matt sean...@gmail.com wrote: Hi, I have been working on a big form and using jquery plug-in (wizard form) to divide tit into small subforms. Now, I am trying to integrate the Validation plugin to deal with the validation and come up with an issue. I run validation on subforms which contains two buttons(back, next). Those 2 buttons are input:buttontype but not input:submit. I realise the Validation plug-in would trigger the validation on submit event. Is there any way I can modify the code so that it could handle my requirement? Having a look on the multipart demo which is the exact scenario I am dealing with. However, the page below is not working. I tried on both IE and FF. http://jquery.bassistance.de/validate/demo/multipart/ Please advise. Cheers, Matt
[jQuery] Re: trigger validation by input:button
There definitely is a space between button and id. That must have just been a side effect of the email. Unfortunately, like I said, javascript is not my strength. I don't even know what a breakpoint is. I starting to think I'm just in over my head. On Jul 7, 12:03 am, Alletha McIntyre amcint...@bigmate.com.au wrote: It sounds like the validation is not attached to the click of the next button. If you stick a breakpoint in the step method - does it hit the breakpoint? Also - there is no space between button and id (buttonid=btnNext1 value=Next class={step:'#step1control'} nextbuttonNext/button) in the html markup. This could cause jQuery to not find the element with that id then not run the method. (could also just be an error in pasting it into the email??) Let me know!! -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jon Sent: Tuesday, 7 July 2009 2:58 PM To: jQuery (English) Cc: Alletha McIntyre Subject: [jQuery] Re: trigger validation by input:button So I got the error to go away by using: var validator = $(#testForm).validate(); But now the problem is that the button proceeds to the next step, even if there are errors. I can't get it to not display #step_2 when there are errors. It was suggested that I try using class={required:true} on the input instead of class=required, but that didn't work. I don't fully understand what the added method is doing, but it seems to me like it's not being called or something. The statement if (validator.element(#btnNext1)) always comes out true, even when I tried explicitly setting var isValid = false; in the method. I've uploaded a test page:http://www.angelo.edu/webservices/validateTest.html. Any help would be greatly appreciated. On Jul 6, 3:14 pm, Jon jon.wil...@angelo.edu wrote: I have tried unsuccessfully to implement this solution, but I keep getting the error: validator is not defined if (validator.element(#btnNext1)) { Here is my code: head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / script type=text/javascript src=/scripts/jquery/ jquery-1.3.2.min.js/script script type=text/javascript src=/scripts/jquery/jquery-validate/ jquery.validate.min.js/script script type=text/javascript $(document).ready(function(){ $.validator.addMethod(step, function(value, element, param) { var isValid = true; var elements = $(param).find(:input) .not('input[type=hidden]') .not(:submit, :reset, :image, :button, [disabled]); alert(elements.length); for (var i = 0; i elements.length; i++) { if (!this.element(elements[i])){ isValid = false; } } return isValid; }, ); $(#testForm).validate(); $(#btnNext1).click(function() { if (validator.element(#btnNext1)) { $(#step_1).hide(); $(#step_2).show(); } }); }); /script titleUntitled Document/title /head body form id=testForm div id=step_1 div id=step1control input name=name type=text class=required / /div buttonid=btnNext1 value=Next class={step:'#step1control'} nextbuttonNext/button /div div id=step_2 pStep 2/p /div /form /body On Jun 24, 12:56 am, Mac amcint...@bigmate.com.au wrote: Hi Matt I came across the same issue when I tried to create a wizard. I overcame this by doing the following: Write a validator extension that looks something like this and use the add method to add it: $.validator.addMethod(step, function(value, element, param) { var isValid = true; var elements = $(param).find(:input) .not('input[type=hidden]') .not(:submit, :reset, :image, :button, [disabled]); for (var i = 0; i elements.length; i++) { if (!this.element(elements[i])){ isValid = false; } } return isValid; }, ); Attach this method to thebuttonitself and pass it the elementid as param like so: buttonid=btnNext1 value=Next class={step:'#step1control'} nextbuttonNext/button The step1control can be a div containing all the elements that you want tovalidate. Then you need to run some code in the click event of thebuttonto check thebutton( and thus the step) is valid. eg: $(#btnNext1).click(function() { if (validator.element(#btnNext1)) { $(#step_1).hide(); $(#step_2).show(); } }); I have created wizards like this with the validator plugin multiple times and seems to work okay!!Hope
[jQuery] Re: trigger validation by input:button
By the way. Do you have any examples of where you've implemented this sort of thing? I'd like to see it in action somewhere. I learn well by studying working examples. On Jul 7, 12:03 am, Alletha McIntyre amcint...@bigmate.com.au wrote: It sounds like the validation is not attached to the click of the next button. If you stick a breakpoint in the step method - does it hit the breakpoint? Also - there is no space between button and id (buttonid=btnNext1 value=Next class={step:'#step1control'} nextbuttonNext/button) in the html markup. This could cause jQuery to not find the element with that id then not run the method. (could also just be an error in pasting it into the email??) Let me know!! -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jon Sent: Tuesday, 7 July 2009 2:58 PM To: jQuery (English) Cc: Alletha McIntyre Subject: [jQuery] Re: trigger validation by input:button So I got the error to go away by using: var validator = $(#testForm).validate(); But now the problem is that the button proceeds to the next step, even if there are errors. I can't get it to not display #step_2 when there are errors. It was suggested that I try using class={required:true} on the input instead of class=required, but that didn't work. I don't fully understand what the added method is doing, but it seems to me like it's not being called or something. The statement if (validator.element(#btnNext1)) always comes out true, even when I tried explicitly setting var isValid = false; in the method. I've uploaded a test page:http://www.angelo.edu/webservices/validateTest.html. Any help would be greatly appreciated. On Jul 6, 3:14 pm, Jon jon.wil...@angelo.edu wrote: I have tried unsuccessfully to implement this solution, but I keep getting the error: validator is not defined if (validator.element(#btnNext1)) { Here is my code: head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / script type=text/javascript src=/scripts/jquery/ jquery-1.3.2.min.js/script script type=text/javascript src=/scripts/jquery/jquery-validate/ jquery.validate.min.js/script script type=text/javascript $(document).ready(function(){ $.validator.addMethod(step, function(value, element, param) { var isValid = true; var elements = $(param).find(:input) .not('input[type=hidden]') .not(:submit, :reset, :image, :button, [disabled]); alert(elements.length); for (var i = 0; i elements.length; i++) { if (!this.element(elements[i])){ isValid = false; } } return isValid; }, ); $(#testForm).validate(); $(#btnNext1).click(function() { if (validator.element(#btnNext1)) { $(#step_1).hide(); $(#step_2).show(); } }); }); /script titleUntitled Document/title /head body form id=testForm div id=step_1 div id=step1control input name=name type=text class=required / /div buttonid=btnNext1 value=Next class={step:'#step1control'} nextbuttonNext/button /div div id=step_2 pStep 2/p /div /form /body On Jun 24, 12:56 am, Mac amcint...@bigmate.com.au wrote: Hi Matt I came across the same issue when I tried to create a wizard. I overcame this by doing the following: Write a validator extension that looks something like this and use the add method to add it: $.validator.addMethod(step, function(value, element, param) { var isValid = true; var elements = $(param).find(:input) .not('input[type=hidden]') .not(:submit, :reset, :image, :button, [disabled]); for (var i = 0; i elements.length; i++) { if (!this.element(elements[i])){ isValid = false; } } return isValid; }, ); Attach this method to thebuttonitself and pass it the elementid as param like so: buttonid=btnNext1 value=Next class={step:'#step1control'} nextbuttonNext/button The step1control can be a div containing all the elements that you want tovalidate. Then you need to run some code in the click event of thebuttonto check thebutton( and thus the step) is valid. eg: $(#btnNext1).click(function() { if (validator.element(#btnNext1)) { $(#step_1).hide(); $(#step_2).show(); } }); I have created wizards like this with the validator plugin multiple times and seems to work okay!!Hope it helps!! On Jun 12, 3:58 pm, Matt sean...@gmail.com wrote: Hi, I
[jQuery] Cycle removes background image from thumbnails (pager)
Right, here goes: I'm using a modified jQuery Cycle Plugin - 'goto' Demo 2 (aka: Poor Man's pager) implementation of the Cycle plugin, this works fine in FF2+, Op9, Saf3+ and Chrome2 but in IE cycle stops the background- image from repeating! As usual I cannot give out a public link due to NDA but I can give you these two image locations to see the differences: http://area51.slnmedia.com/cycle/cycle-issue-ff.jpg http://area51.slnmedia.com/cycle/cycle-issue-ie.jpg Finally, thank you for reading up to this point, hopefully together we can sort this out! Jon Here is my current code. html: div id=gallery div id=thumbnails/div div id=slideshow img id=large src=/_assets/img/gallery/gallery- image01.jpg alt=Gallery Image width=738 height=578 / /div /div css: #gallery { width: 738px; float: right; position: relative; text- align: center; } #gallery #thumbnails { position: absolute; top: 0; left: 0; width: 738px; height: 70px; background: transparent url('/_assets/img/gallery/ fff-50.png') 0 0 repeat !important; z-index: 1000; border-bottom: 1px solid #c50a33; } #gallery #thumbs { margin: 0; padding: 5px; width: 728px; height: 60px; z-index: 1001; } #gallery #thumbs li { width: 48px; height: 48px; margin: 5px; padding:0; float: left; border: 1px solid #fff; } #gallery #thumbs li a { width: 48px; display: block; } script: $('#thumbnails').append('ul id=thumbs/ul'); var $th = $('#thumbs'); var $ss = $('#slideshow'); // add slides to gallery for (i = 2; i 13; i++ ) { ( i 10 ) ? x = '0' + i : x = i; $ss.append('img src=/_assets/img/gallery/gallery-image'+x+'.jpg alt=Gallery Image '+i+' width=738 height=578 /'); } // start the slideshow $ss.cycle({ fx: 'fade', cssBefore: { zIndex: 1 }, timeout: 3000, speed: 1500, fit: 1, cssAfter: { zIndex: 0 } }); // add the thumbnails to the DOM $ss.children().each(function(i) { ( (i+1) 10 ) ? x = '0' + (i+1) : x = (i+1); // create thumbnails $('lia class=thumb href=/_assets/img/gallery/gallery-image'+x +'.jpgimg src=/_assets/img/gallery/thumbs/gallery-image'+x+'.jpg alt=Gallery Image '+x+' width=48 height=48 //a/li') // append it to thumbnail container .appendTo($th) // bind click handler .click(function() { // cycle to the corresponding slide $ss.cycle(i); return false; }); });
[jQuery] Re: cycle plugin pagerAnchorBuilder
OK, there were no takers on this. In the unlikely event that anyone's interested, here's the work-around that I arrived at. It's simple enough that I think it will not cause me any problems, but I sure would like to know what the right solution might be. In the HTML, an image collection like this: div id=cycleport img class=cimg src=images/1.jpg alt = / img class=cimg src=images/2.jpg alt = / img class=cimg src=images/3.jpg alt = / img class=cimg src=images/4.jpg alt = / img class=cimg src=images/5.jpg alt = / img class=cimg src=images/6.jpg alt = / /div using cycle, I navigate this collection with prev/next links, but I also wanted to provide a drop-down list allowing the user to jump straight to specific images and then go prev/next from there. ul id=clientList lia href=#Foo text/a/li lia href=#Bar text/a/li lia href=#Baz text/a/li /ul My solution (a very unsatisfying kluge) was to simply add empty, dummy lines to the list thus: ul id=clientList li class=noshow/li lia href=#Foo text/a/li li class=noshow/li li class=noshow/li lia href=#Bar text/a/li lia href=#Baz text/a/li /ul to allow the user to go directly to 2.jpg, 5.jpg, and 6.jpg by choosing from the list and using a cycle call like this: $('#cycleport').cycle({ prev: '#prev', next: '#next', timeout: 0, before: swapText, pager: '#clientList', pagerAnchorBuilder: function(idx, slide) { return '#clientList li:eq(' + (idx) + ') a'; } }); If anybody has a cleaner solution, I'd sure love to know about it. Jon
[jQuery] Re: cycle plugin pagerAnchorBuilder
Mike Alsup, Thanks so much for pointing out the obvious; no really, I mean it sincerely. I so often overlook the obvious, to my cost. I didn't realize that I could simply pass a bare integer to the cycle call. Admiration and gratitude for a wonderfully well thought out and effective tool! Jon This is what I'd do: ul id=clientList lia href=# data-slide=2Foo text/a/li lia href=# data-slide=5Bar text/a/li lia href=# data-slide=6Baz text/a/li /ul $(function() { $('#cycleport').cycle({ prev: '#prev', next: '#next', timeout: 0, before: swapText }); $('#clientList li a').click(function() { var slide = $(this).attr('data-slide'); slide = parseInt(slide); $('#cycleport').cycle(slide); return false; }); });
[jQuery] firefox hover bug with 'title' attribute?
jQuery 1.2.6 and Firefox 3.0.7 on MacBook OS X 10.5.5 If I might renew an unanswered thread: I've encountered this twice now in different contexts. This only occurs in FF, so far as I know. If .hover() is acting on a div that contains an image link, and that link has a title attribute, hover misbehaves by firing when the mouse is moved after a pause. an example of the problem can be seen here: http://home.myuw.net/jjcrump/test/opacity-test.html The first element has an image link with a title attribute, the second has link with no title attribute. If you hover over the first one and let the cursor pause a moment, FF's tooltip with the title text appears. Then when you move the mouse, the hover function fires again. The link's hover property seems to be interfering with jQuery's .hover() function. Any Ideas? Jon
[jQuery] Re: firefox hover bug with 'title' attribute?
Waseem thanks for responding. On Fri, 1 May 2009, waseem sabjee wrote: does the same instance occur if you use any of the jquery 1.3.x scripts ? I updated the example at http://home.myuw.net/jjcrump/test/opacity-test.html to use jquery 1.3.2 and it still shows the same effect. I can live without the title attribute, but I'm curious, and puzzled. Jon On Fri, May 1, 2009 at 12:21 AM, Jon Crump jjcr...@myuw.net wrote: jQuery 1.2.6 and Firefox 3.0.7 on MacBook OS X 10.5.5 If I might renew an unanswered thread: I've encountered this twice now in different contexts. This only occurs in FF, so far as I know. If .hover() is acting on a div that contains an image link, and that link has a title attribute, hover misbehaves by firing when the mouse is moved after a pause. an example of the problem can be seen here: http://home.myuw.net/jjcrump/test/opacity-test.html The first element has an image link with a title attribute, the second has link with no title attribute. If you hover over the first one and let the cursor pause a moment, FF's tooltip with the title text appears. Then when you move the mouse, the hover function fires again. The link's hover property seems to be interfering with jQuery's .hover() function. Any Ideas? Jon
[jQuery] Ajax dot net - Sending objects to the server problem
Hi, i'm trying to use the ajax dot net plugin to perform ajax calls to an AJAX enabled WCF service. No matter what i do i get an error: 'Object reference not set to an instance of an object.' However from firebug i can see the JSON object that is getting posted: {contactmessage: {__type:ContactMessage,name:Jon,email:j...@jon.co.uk,message:gfd }} So it looks like something is being sent correctly but not handled on the other end. In the examples that come with this plugin there is no extra handling needed. He just packages the object up in the javascript and calls it as the correct type at the other end. I don't know how! After a couple of hours research i came across the OnDeserializing method and tried to implement that but to no avail. Same error. I really can't see where i'm going wrong or how to debug this! Can anyone point me in the right direction? Here's my javascript: $(.ContactForm).prepend(div class=\ContactMessage\/div); var formmessage = $(.ContactForm .ContactMessage).css(display, none); $(.ContactForm .Submit).click(function(evt) { evt.preventDefault(); var contactmessage = new Object(); contactmessage.__type = ContactMessage; contactmessage.name = $ (#ctl00_ctl00_CPH_Content_CPH_Content_TB_Name).val(); contactmessage.email = $ (#ctl00_ctl00_CPH_Content_CPH_Content_TB_Email).val(); contactmessage.message = $ (#ctl00_ctl00_CPH_Content_CPH_Content_TB_Message).val(); var data = new Object(); data.contactmessage = contactmessage; $.ajaxDotNet(url + SendMessage, { verb: POST, data: data, beforeSend: function(r) { formmessage.html(pSending.../p); return r; }, success: function(obj) { obj = obj.d; formmessage.html(pThank you, your message has been sent!/pp + obj + /p); }, error: function(x, y, z) { formmessage.html(pThere was an error sending your message, please try again./pp + x.responseText + /p); }); } }); }); And server code: [OperationContract] public string SendMessage(ContactMessage message) { try { return message.SendMessage(); } catch (Exception ex) { return There was an error sending the message!br / + ex.Source + | + ex.Message; } } [DataContract] public class ContactMessage { public ContactMessage message; public string _Name; public string _Email; public string _Message; public ContactMessage() { _Name = string.Empty; _Email = string.Empty; _Message = string.Empty; } public string SendMessage() { try { return Hello, + _Name + : + _Email + who said: + _Message; } catch (Exception ex) { return ex.Message; } } [OnDeserializing] public void OnDeserializing(StreamingContext sc) { message = new ContactMessage(); } [DataMember(Name = name)] public string Name { get { return message._Name; } set { message._Name = value; } } [DataMember(Name = email)] public string Email { get { return message._Email; } set { message._Email = value; } } [DataMember(Name = message)] public string Message { get { return message._Message; } set { message._Message = value; } } }
[jQuery] jScrollPane issues
Evening All! I'm having a bit of issue with the jScrollPane plugin by Kelvin Luck. A couple of issues actually! First, in non-IE browsers the scroll will not apply to the container specified, even though that container IS wrapped by the .jScrollContainer div by the script. Second, the width of the container becomes as wide as the content without any line breaks?? I'll post code below, and can send private url for those who wish to see, unfortunately usual client rules apply on this! Thanks in advance for any help! Cheers, Jon All pretty damn simple but not working in Non-IE browsers? Main container: div class=wrapper-portfolio-content h6Project Name/h6 div id=copy class=scroll-pane pProject Description/p /div /div CSS: .wrapper-portfolio-content { float: right; width: 213px; height: 369px; } .scroll-pane { width: 213px; height: 349px; overflow: auto; } DocReady JS: //Solution for the scrolling content $('.scroll-pane').jScrollPane({ showArrows: true, scrollbarWidth: 16, arrowSize: 16 });
[jQuery] Find form input from click on child img
hi, I'm working on a cms and have hit a brick wall with something. I have the following html ul - li - - input.is-hero - - input.weight - ul - - li - - - img.thickbox (preview) - - - img.is-hero I'm listening to the click event of is-hero, but can't seem to get from that back up the tree to the input to set it's value. This is what I have (that's broken): $(.admin-add-edit-media-make-hero).click(function() { console.log('hello i have been clicked, click click click'); // parent li var ul = $(this).parent(); var li = $(this).parent().parent(); var input = $(li).find('input'); console.log('ul: '+ul); // ul: [object Object] console.log('li: '+li); // li: [object Object] console.log('input: '+input); // input: [object Object] }); No matter what I try though comes up as undefined after this, eg: input.attr('id'); // undefined input.val(); // undefined also tried $(li).find('input.is-hero) but that got me nowhere. grateful for any tips. Cheers, Jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett
[jQuery] Superfish: automatically expand 3rd-level menu?
I have a 3-level menu using JQuery-Superfish. I would like to hover over the top-level menu item and have BOTH the 2nd and 3rd-level menus open automatically. Any ideas?
[jQuery] Superfish: automatically expand 3rd-level menu?
Hello, I have a 3-level menu using Superfish. I would like to hover over the top-level menu item and have BOTH the 2nd and 3rd-level menus open automatically. Any ideas? Thanks in advance! Jon
[jQuery] Re: Photo Gallery, Thumbnail navigation
Kevin, On Mon, 16 Mar 2009, kmoll092 wrote: I am looking at jcarousel and i am a little confused on how to integrate and can't seem to find great documentation, is there a site with example code on how to integrate it into my site. If anyone else has a suggestion on the best way to acheive my goal I would love to hear it. If you follow carefuly the tutorial at http://sorgalla.com/projects/jcarousel/#Getting-Started you'll be on your way. The example at: http://sorgalla.com/projects/jcarousel/examples/static_simple.html is very instructive. Just have a look at the source. My initial thought was that I could enter the thumbnails into an array, have jquery load the files with a link and when the user You don't have to do anything special with the thumbnails. In your html, just create an ordinary ul list where each line is like this: liimg src=path/to/img width=75 height=75 alt= //li then make sure you reference the necessary libraries in the head of your document thus: script type=text/javascript src=path/to/jquery-1.2.3.pack.js/script script type=text/javascript src=path/to/jquery.jcarousel.pack.js/script and reference the necessary css files thus: link rel=stylesheet type=text/css href=path/to/jquery.jcarousel.css / link rel=stylesheet type=text/css href=path/to/skins/tango/skin.css / initialize jcarousel like this: jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel(); }); And the jcarousel library does the rest. You can position the ul with the usual css rules and you can tweak the tango/skin.css to get the look you want or build your own skin based on it. good luck, Jon
[jQuery] Re: test for .is(:visible) fails in Safari
Ricardo, Thanks so much for responding. That's very helpful. My use of events has been very rudimentary so far; your .bind() example has helped me understand them more fully. And now that I know what I'm looking for, various approaches to the problem have been illuminating as well. for example ajp's recent thread:: http://osdir.com/ml/jquery-dev/2009-02/msg00615.html On Sat, 14 Mar 2009, ricardobeat wrote: Try this: el.find(#pic) .attr({src: pix[imgName].imgSrc, name: imgName}) .bind('load readystatechange', function(e){ if (this.complete || (this.readyState == 'complete' e.type = 'readystatechange')) { el.fadeIn(slow); $(#loading).hide(); }; }); The onload event for images is a cross-browser mess. - ricardo
[jQuery] Re: Photo Gallery, Thumbnail navigation
kmoll, third slot. It seems like this would be pretty easy, but it is killing me trying to figure it out. I have spent weeks on it with no Turns out, it's not really that easy, as you've discovered; however, the hard work has been done for us in jCarousel.(I know there are other libraries that implement the same idea as well). I'm pretty new to jQuery too, but I was delighted to find that using the jquery extension, jCarousel, turned out to be very straightforward. Check it out at: http://sorgalla.com/jcarousel/ Jon On Sun, 15 Mar 2009, kmoll092 wrote: I am building a photo gallery for a friend using JQuery. I have div with thumbnails below a main picture that changes based on the thumbnail you click. I want to be able to add a next and previous button for the thumbnails, because there are a lot of them. I am relatively new to JQuery, but am learning quickly. I am wondering what the best solution for this is. Currently I have the the thumbs loaded and you can click on them to change the image, but I can't figure out how to only show the first three thumbnails, and have a next/previous button to scroll throught the thumbnails and then change the links when the thumbnails change. Ideally three thumbs would show and clicking the next button would move the second thumbnail to the first slot, the third thumbnail to the second slot and now the fourth thumbnail would now show in the third slot. It seems like this would be pretty easy, but it is killing me trying to figure it out. I have spent weeks on it with no solution. this is the code I have so far $(document).ready(function() { $('#thumbs a').click(function(evt) { evt.preventDefault(); var imgPath = $(this).attr('href'); var oldImage=$('#photos img'); var newImage = $('img src=' + imgPath + ''); newImage.hide(); $('#photos').prepend(newImage); newImage.fadeIn(1000); oldImage.fadeOut(000,function(){ $(this).remove(); }); }); // end click $('#thumbs a:first').click(); }); // end ready then I have an empty dive for the photos and the div for the thumbs looks like this: div id=thumbs a href=images/portrait1.jpgimg src=images/portrait1_th.jpg / /a a href=images/portrait2.jpgimg src=images/ portrait2_th.jpg //a a href=images/portrait3.jpgimg src=images/ portrait3_th.jpg //a a href=images/portrait4.jpgimg src=images/ portrait4_th.jpg //a a href=images/portrait5.jpgimg src=images/ portrait5_th.jpg //a /div any help would be great I am going crazy with this
[jQuery] Re: test for .is(:visible) fails in Safari
Dear all, OK, solved it myself in case anyone's still listening. It still remains a puzzle why safari on Mac interprets the code differently. The if/else test below isn't necessary. The fadeOut was executing, but the .load() callback failed when the .thumb clicked was the same one as the previous click. Both FF and IE didn't blink when the src of #pic remained the same, but safari wouldn't execute the .load callback because nothing loaded: the src of #pic remained the same. The solution for my purposes was to set the src of #pic to null and then re-set it to pix[imgName].imgSrc whatever it might be, then .load() sees that something has loaded and executes the callback. Is this a known discrepancy between how FF, IE, and Safari interpret .load(), or something completely screwy and idiosyncratic to my klugy code? (jQuery 1.2.6, by the way, in safari 3.1.2) Jon On Fri, 13 Mar 2009, Jon Crump wrote: Dear all, I'm not sure if this is a jQuery question or not, but I got the following code to work in FF, but it fails in Safari: $(.thumb).click(function() { var imgName = $(this).attr(alt); var el = $(#dropdown); if (el.is(:visible) $(#pic).attr(name) == imgName) return; else { el.fadeOut(slow, function() { $(#loading).show(); el.find(#textContent) .text(pix[imgName].aText); el.find(#pic) .attr({src: pix[imgName].imgSrc, name: imgName}) .load(function(){ el.fadeIn(slow); $(#loading).hide(); }); }); } }); The if/else test was necessitated by the fact that if the user clicked on the same thumbnail image twice, the #dropdown element faded out and didn't fade back in. In FF clicking on the same image twice makes no change, but in Safari, clicking on the same image twice makes no change IF #dropdown is visible, if #dropdown is NOT visible and the user clicks on the same thumbnail that was last clicked on, the loading gif displays but the #dropdown does not. I'm sure this is just my own javascript inexperience, but can anyone suggest where I'm going wrong? Thanks, Jon
[jQuery] test for .is(:visible) fails in Safari
Dear all, I'm not sure if this is a jQuery question or not, but I got the following code to work in FF, but it fails in Safari: $(.thumb).click(function() { var imgName = $(this).attr(alt); var el = $(#dropdown); if (el.is(:visible) $(#pic).attr(name) == imgName) return; else { el.fadeOut(slow, function() { $(#loading).show(); el.find(#textContent) .text(pix[imgName].aText); el.find(#pic) .attr({src: pix[imgName].imgSrc, name: imgName}) .load(function(){ el.fadeIn(slow); $(#loading).hide(); }); }); } }); The if/else test was necessitated by the fact that if the user clicked on the same thumbnail image twice, the #dropdown element faded out and didn't fade back in. In FF clicking on the same image twice makes no change, but in Safari, clicking on the same image twice makes no change IF #dropdown is visible, if #dropdown is NOT visible and the user clicks on the same thumbnail that was last clicked on, the loading gif displays but the #dropdown does not. I'm sure this is just my own javascript inexperience, but can anyone suggest where I'm going wrong? Thanks, Jon
[jQuery] Re: Shadowbox and JQuery
Hey BB, Thanks so much! What was puzzling me was the way the skin path is formed. For anyone else who is having issues with this, the first parameter in the loadSkin method is the folder name of your skin and the second is the path from the root to your skin folder but NOT including your skin folder. Phew, cheers bud! On Mar 10, 8:50 am, BB buchholz.bast...@googlemail.com wrote: Hi Jon, you have to load the skin of the shadowbox wich seems not to be included automatically if you build your shadowbox... So go tohttp://www.mjijackson.com/shadowbox/doc/download.htmlDownload Code and go to shadowbox-2.0-code/src/skin and copy the classic folder to your server. Then modify your Acanthus.js to something like this: Shadowbox.loadSkin('classic', 'path/to/skin/folder'); $(document).ready(function(){ Shadowbox.init(); }); hope this helps! On 10 Mrz., 00:25, Jon cakeordeat...@gmail.com wrote: Can anyone tell me why this isn't working:http://acanthus.sunshine-design.co.uk/projects.htm It's telling me that there's no skin loaded but the shadowboc css is included here:http://acanthus.sunshine-design.co.uk/Css/shadowbox.css Do i need to tell it where the skin is somehow? Or is this a bug?
[jQuery] Re: Shadowbox and JQuery
Hey BB, Thanks so much! What was puzzling me was the way the skin path is formed. For anyone else who is having issues with this, the first parameter in the loadSkin method is the folder name of your skin and the second is the path from the root to your skin folder but NOT including your skin folder. Phew, cheers bud! On Mar 10, 8:50 am, BB buchholz.bast...@googlemail.com wrote: Hi Jon, you have to load the skin of the shadowbox wich seems not to be included automatically if you build your shadowbox... So go tohttp://www.mjijackson.com/shadowbox/doc/download.htmlDownload Code and go to shadowbox-2.0-code/src/skin and copy the classic folder to your server. Then modify your Acanthus.js to something like this: Shadowbox.loadSkin('classic', 'path/to/skin/folder'); $(document).ready(function(){ Shadowbox.init(); }); hope this helps! On 10 Mrz., 00:25, Jon cakeordeat...@gmail.com wrote: Can anyone tell me why this isn't working:http://acanthus.sunshine-design.co.uk/projects.htm It's telling me that there's no skin loaded but the shadowboc css is included here:http://acanthus.sunshine-design.co.uk/Css/shadowbox.css Do i need to tell it where the skin is somehow? Or is this a bug?
[jQuery] JQuery Sliding Panels
I'm looking for something that replicates the functionality of the below: http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsSample.html I'm sure i've seen something somewhere that did this in JQuery but i can't find anything similar! I've search the plugin repository and Google but i can't find anything! Sometimes the net is just too big, though i'm starting to think that maybe i was imagining it? The one i remember had different types of transitions. Sliding diagonally or sliding New York city block style.
[jQuery] Shadowbox and JQuery
Can anyone tell me why this isn't working: http://acanthus.sunshine-design.co.uk/projects.htm It's telling me that there's no skin loaded but the shadowboc css is included here: http://acanthus.sunshine-design.co.uk/Css/shadowbox.css Do i need to tell it where the skin is somehow? Or is this a bug?
[jQuery] Re: Ajax Dot Net Plugin
I've been trying to solve this and i just cannot find the solution. The service is a WCF Service - .svc if that effects anything? There is definitely no authentication on the application. It's off in web.config. I have tried everything i can find - including reinstalling IIS. After doing that i get a new error message which is essentially the content of my Service.svc file: %@ ServiceHost Language=C# Debug=true Service=Service CodeBehind=~/App_Code/Service.cs % I'm out of my depth here - i have no idea what is going on! On Mar 4, 5:33 pm, Joseph Le Brech jlebr...@hotmail.com wrote: can you test your webservice? Put a breakpoint to see what it is inserting into the SOAP object. That's one thing i do not like about the asp.net service thing is their insistance on wrapping json inside a SOAP object, it's like sticking binary inside XML. Date: Wed, 4 Mar 2009 09:13:02 -0800 Subject: [jQuery] Re: Ajax Dot Net Plugin From: cakeordeat...@gmail.com To: jquery-en@googlegroups.com I'm afraid i don't have the JSON handy. Being new to this i'm not sure how to get to that layer yet! Anyway when i do alert(x.responseText) I get: h2 iThe resource cannot be found./i /h2/span [HttpException]: The file '/service.svc/helloworld/CMSLogin.aspx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) (this is the most pertinent part and a larger error that i don't want to clog the thread with) Obviously /service.svc/helloworld is what should get sent however i don't understand how my CMSLogin.aspx page has gotten added on there! Dot net forms authentication perhaps? Though i'm not redirecting anything at this point... Here's the javascript function again: // Hello World $.ajaxDotNet(/Service.svc/HelloWorld, { verb: GET, success: function(obj) { obj = obj.d; alert('Hello World'); $(.HelloWorld).text(obj); }, error: function(x, y, z) { alert(x.responseText); alert(y.responseText); alert(z.responseText); } }); Additionally y.responseText and z.responseText come out as undefined. Again, i'm miffed! On Mar 4, 4:57 pm, Joseph Le Brech jlebr...@hotmail.com wrote: Do you have the json handy?? http://www.jsonlint.com/ Paste the output in here to see if its valid json? is it generated from a asp service? Date: Wed, 4 Mar 2009 08:24:52 -0800 Subject: [jQuery] Re: Ajax Dot Net Plugin From: morni...@gmail.com To: jquery-en@googlegroups.com he's got the error, which is: SyntaxError: JSON.parse and sorry about my last post alert(x.responseText) will show the error text (as will Firebug as mentioned about) anyways, the error your getting is that it seems that your ASP.NET code can't parse the results to JSON On Mar 4, 11:02 am, Joseph Le Brech jlebr...@hotmail.com wrote: get firebug and put a breakpoint on for the line for error. Date: Wed, 4 Mar 2009 07:58:45 -0800 Subject: [jQuery] Re: Ajax Dot Net Plugin From: cakeordeat...@gmail.com To: jquery-en@googlegroups.com P.S. alert(y) gives Not Found alert(z) gives SyntaxError: JSON.parse Where do i find out what x y and z are? Thanks! On Mar 4, 3:52 pm, Jon cakeordeat...@gmail.com wrote: That's great! Thanks! Here's the error: [object XMLHttpRequest] What does that mean. I'm confused... I thought the plugin worked via JSON... On Mar 4, 3:41 pm, MorningZ morni...@gmail.com wrote: Show what the error is error: function(x, y, z) { alert(x); } should show you what the error actually is instead of guessing On Mar 4, 10:10 am, Jon cakeordeat...@gmail.com wrote: I'm trying to get the ajax dot net plugin working and failing miserably. I've added the service - both manually and by dragging the example files into my solution. I've copied the hello world function from the example solution and added it to the service and the jquery for it. I've copied the system.serviceModel into my web.config. Again, i've tried using the default one created when adding the service to the solution and i've copied it across from the example solution. But no matter what i do i can't get the ajax to work. // Hello World $.ajaxDotNet(url + HelloWorld, { verb: GET, success: function(obj) { obj = obj.d; alert('Hello World'); $(.HelloWorld).text(obj); }, error: function() { alert('Hello Error'); $(.HelloWorld).text(Error); } }); Every time i run it i just get the Hello Error alert
[jQuery] jcarousellite css width issue?
Hello all! I was wondering if anyone could shed some light on a problem I'm facing? I'm using Ganeshji Marwaha's jcarousellite to create a slide show of three (possibly more later) definition lists for client contact details. Each DL contains three contacts. Each DL is held within an LI which is a child of an UL which is a child of the containing DIV. Now, here's the kicker, and finally my question: Why, will the LI's not adhere to the set width? Each of the DL's are cut off by about 20px to the right, thereby slicing the text for the contacts information if it reaches that far! Please request online link for reference, as this is a client site! I'm sure we all understand that! Thanks in advance for any help! J HTML: div id=carousel ul li dl dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/ span/ dt dd class=p+44 (0)20 7### br / a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/ span/ dt dd class=p+44 (0)20 7### br / a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/ span/ dt dd class=p+44 (0)20 7### br / a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd /dl /li [x3] /ul /div CSS: #carousel { overflow: hidden; visibility: visible; width: 600px; height: 325px; position: relative; z-index: 2; width: 2000px; left: -5000px; } #carousel ul { margin: 0; padding: 0; list-style-type: none; } #carousel li { width: 300px; } #carousel dl { width: 300px; font-size: 11px;} #carousel dt { height: 50px; } #carousel dd { height: 40px; } #carousel dt img { margin: 0 10px; } #carousel .h1 { font-size: 20px; line-height: 0.8em; font-weight: normal; } #carousel .h1 span { font-size: 14px; } #carousel .p { margin: 0 0 20px; } JS: //Contact Us Switches: $(#carousel).jCarouselLite({ circular: false, visible: 2, scroll: 1, btnNext: .more, btnPrev: .less });
[jQuery] jcarousellite slide widths issue
Hello all! I was wondering if anyone could shed some light on a problem I'm facing? I'm using Ganeshji Marwaha's jcarousellite to create a slide show of three (possibly more later) definition lists for client contact details. Each DL contains three contacts. Each DL is held within an LI which is a child of an UL which is a child of the containing DIV. eg1: div id=carousel ul li dl dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/span/ dt dd class=p+44 (0)20 7### br /a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/span/ dt dd class=p+44 (0)20 7### br /a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/span/ dt dd class=p+44 (0)20 7### br /a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd /dl /li li dl dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/span/ dt dd class=p+44 (0)20 7### br /a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/span/ dt dd class=p+44 (0)20 7### br /a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/span/ dt dd class=p+44 (0)20 7### br /a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd /dl /li li dl dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/span/ dt dd class=p+44 (0)20 7### br /a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/span/ dt dd class=p+44 (0)20 7### br /a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd dt class=h1 title=Contact NAME AND DETAILSimg src=/images/ contact/thumbs/headshot.jpg width=80 height=100 class=left alt=Contact Image /CONTACT NAMEbr /spanCONTACT POSITION/span/ dt dd class=p+44 (0)20 7### br /a href=mailto:cona...@email.com; target=_blank alt=Contact CONTACT NAME AND DETAILS title=Contact CONTACT NAME AND DETAILS/a/dd /dl /li /ul /div Now in my CSS I style this as: #carousel { overflow: hidden; visibility: visible; width: 600px; height: 325px; position: relative; z-index: 2; width: 2000px; left: -5000px; } #carousel ul { margin: 0; padding: 0; list-style-type: none; } #carousel li { width: 300px; } #carousel dl { width: 300px; font-size: 11px;} #carousel dt { height: 50px; } #carousel dd { height: 40px; } #carousel dt img { margin: 0 10px; } #carousel .h1 { font-size: 20px; line-height: 0.8em; font-weight: normal; } #carousel .h1 span { font-size: 14px; } #carousel .p { margin: 0 0 20px; } Now, here's the kicker, and finally my question:
[jQuery] Ajax Dot Net Plugin
I'm trying to get the ajax dot net plugin working and failing miserably. I've added the service - both manually and by dragging the example files into my solution. I've copied the hello world function from the example solution and added it to the service and the jquery for it. I've copied the system.serviceModel into my web.config. Again, i've tried using the default one created when adding the service to the solution and i've copied it across from the example solution. But no matter what i do i can't get the ajax to work. // Hello World $.ajaxDotNet(url + HelloWorld, { verb: GET, success: function(obj) { obj = obj.d; alert('Hello World'); $(.HelloWorld).text(obj); }, error: function() { alert('Hello Error'); $(.HelloWorld).text(Error); } }); Every time i run it i just get the Hello Error alert. Does anyone know if i'm missing something essential? Am i making a stupid error? Please help, i'm dying to get this plugin working! And if i can't get this working does anyone else has any experience with JQuery and Dot Net and might be able to point me to a solution?
[jQuery] Re: Ajax Dot Net Plugin
That's great! Thanks! Here's the error: [object XMLHttpRequest] What does that mean. I'm confused... I thought the plugin worked via JSON... On Mar 4, 3:41 pm, MorningZ morni...@gmail.com wrote: Show what the error is error: function(x, y, z) { alert(x); } should show you what the error actually is instead of guessing On Mar 4, 10:10 am, Jon cakeordeat...@gmail.com wrote: I'm trying to get the ajax dot net plugin working and failing miserably. I've added the service - both manually and by dragging the example files into my solution. I've copied the hello world function from the example solution and added it to the service and the jquery for it. I've copied the system.serviceModel into my web.config. Again, i've tried using the default one created when adding the service to the solution and i've copied it across from the example solution. But no matter what i do i can't get the ajax to work. // Hello World $.ajaxDotNet(url + HelloWorld, { verb: GET, success: function(obj) { obj = obj.d; alert('Hello World'); $(.HelloWorld).text(obj); }, error: function() { alert('Hello Error'); $(.HelloWorld).text(Error); } }); Every time i run it i just get the Hello Error alert. Does anyone know if i'm missing something essential? Am i making a stupid error? Please help, i'm dying to get this plugin working! And if i can't get this working does anyone else has any experience with JQuery and Dot Net and might be able to point me to a solution?
[jQuery] Re: Ajax Dot Net Plugin
P.S. alert(y) gives Not Found alert(z) gives SyntaxError: JSON.parse Where do i find out what x y and z are? Thanks! On Mar 4, 3:52 pm, Jon cakeordeat...@gmail.com wrote: That's great! Thanks! Here's the error: [object XMLHttpRequest] What does that mean. I'm confused... I thought the plugin worked via JSON... On Mar 4, 3:41 pm, MorningZ morni...@gmail.com wrote: Show what the error is error: function(x, y, z) { alert(x); } should show you what the error actually is instead of guessing On Mar 4, 10:10 am, Jon cakeordeat...@gmail.com wrote: I'm trying to get the ajax dot net plugin working and failing miserably. I've added the service - both manually and by dragging the example files into my solution. I've copied the hello world function from the example solution and added it to the service and the jquery for it. I've copied the system.serviceModel into my web.config. Again, i've tried using the default one created when adding the service to the solution and i've copied it across from the example solution. But no matter what i do i can't get the ajax to work. // Hello World $.ajaxDotNet(url + HelloWorld, { verb: GET, success: function(obj) { obj = obj.d; alert('Hello World'); $(.HelloWorld).text(obj); }, error: function() { alert('Hello Error'); $(.HelloWorld).text(Error); } }); Every time i run it i just get the Hello Error alert. Does anyone know if i'm missing something essential? Am i making a stupid error? Please help, i'm dying to get this plugin working! And if i can't get this working does anyone else has any experience with JQuery and Dot Net and might be able to point me to a solution?
[jQuery] Re: Ajax Dot Net Plugin
I'm afraid i don't have the JSON handy. Being new to this i'm not sure how to get to that layer yet! Anyway when i do alert(x.responseText) I get: h2 iThe resource cannot be found./i /h2/span [HttpException]: The file '/service.svc/helloworld/CMSLogin.aspx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) (this is the most pertinent part and a larger error that i don't want to clog the thread with) Obviously /service.svc/helloworld is what should get sent however i don't understand how my CMSLogin.aspx page has gotten added on there! Dot net forms authentication perhaps? Though i'm not redirecting anything at this point... Here's the javascript function again: // Hello World $.ajaxDotNet(/Service.svc/HelloWorld, { verb: GET, success: function(obj) { obj = obj.d; alert('Hello World'); $(.HelloWorld).text(obj); }, error: function(x, y, z) { alert(x.responseText); alert(y.responseText); alert(z.responseText); } }); Additionally y.responseText and z.responseText come out as undefined. Again, i'm miffed! On Mar 4, 4:57 pm, Joseph Le Brech jlebr...@hotmail.com wrote: Do you have the json handy?? http://www.jsonlint.com/ Paste the output in here to see if its valid json? is it generated from a asp service? Date: Wed, 4 Mar 2009 08:24:52 -0800 Subject: [jQuery] Re: Ajax Dot Net Plugin From: morni...@gmail.com To: jquery-en@googlegroups.com he's got the error, which is: SyntaxError: JSON.parse and sorry about my last post alert(x.responseText) will show the error text (as will Firebug as mentioned about) anyways, the error your getting is that it seems that your ASP.NET code can't parse the results to JSON On Mar 4, 11:02 am, Joseph Le Brech jlebr...@hotmail.com wrote: get firebug and put a breakpoint on for the line for error. Date: Wed, 4 Mar 2009 07:58:45 -0800 Subject: [jQuery] Re: Ajax Dot Net Plugin From: cakeordeat...@gmail.com To: jquery-en@googlegroups.com P.S. alert(y) gives Not Found alert(z) gives SyntaxError: JSON.parse Where do i find out what x y and z are? Thanks! On Mar 4, 3:52 pm, Jon cakeordeat...@gmail.com wrote: That's great! Thanks! Here's the error: [object XMLHttpRequest] What does that mean. I'm confused... I thought the plugin worked via JSON... On Mar 4, 3:41 pm, MorningZ morni...@gmail.com wrote: Show what the error is error: function(x, y, z) { alert(x); } should show you what the error actually is instead of guessing On Mar 4, 10:10 am, Jon cakeordeat...@gmail.com wrote: I'm trying to get the ajax dot net plugin working and failing miserably. I've added the service - both manually and by dragging the example files into my solution. I've copied the hello world function from the example solution and added it to the service and the jquery for it. I've copied the system.serviceModel into my web.config. Again, i've tried using the default one created when adding the service to the solution and i've copied it across from the example solution. But no matter what i do i can't get the ajax to work. // Hello World $.ajaxDotNet(url + HelloWorld, { verb: GET, success: function(obj) { obj = obj.d; alert('Hello World'); $(.HelloWorld).text(obj); }, error: function() { alert('Hello Error'); $(.HelloWorld).text(Error); } }); Every time i run it i just get the Hello Error alert. Does anyone know if i'm missing something essential? Am i making a stupid error? Please help, i'm dying to get this plugin working! And if i can't get this working does anyone else has any experience with JQuery and Dot Net and might be able to point me to a solution? _ All your Twitter and other social updates in one placehttp://clk.atdmt.com/UKM/go/137984870/direct/01/ _ 25GB of FREE Online Storage – Find out morehttp://clk.atdmt.com/UKM/go/134665320/direct/01/
[jQuery] Re: Ajax Dot Net Plugin
I'm afraid i don't have the JSON handy. Being new to this i'm not sure how to get to that layer yet! Anyway when i do alert(x.responseText) I get: h2 iThe resource cannot be found./i /h2/span [HttpException]: The file '/service.svc/helloworld/CMSLogin.aspx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) (this is the most pertinent part and a larger error that i don't want to clog the thread with) Obviously /service.svc/helloworld is what should get sent however i don't understand how my CMSLogin.aspx page has gotten added on there! Dot net forms authentication perhaps? Though i'm not redirecting anything at this point... Here's the javascript function again: // Hello World $.ajaxDotNet(/Service.svc/HelloWorld, { verb: GET, success: function(obj) { obj = obj.d; alert('Hello World'); $(.HelloWorld).text(obj); }, error: function(x, y, z) { alert(x.responseText); alert(y.responseText); alert(z.responseText); } }); Additionally y.responseText and z.responseText come out as undefined. Again, i'm miffed! On Mar 4, 4:57 pm, Joseph Le Brech jlebr...@hotmail.com wrote: Do you have the json handy?? http://www.jsonlint.com/ Paste the output in here to see if its valid json? is it generated from a asp service? Date: Wed, 4 Mar 2009 08:24:52 -0800 Subject: [jQuery] Re: Ajax Dot Net Plugin From: morni...@gmail.com To: jquery-en@googlegroups.com he's got the error, which is: SyntaxError: JSON.parse and sorry about my last post alert(x.responseText) will show the error text (as will Firebug as mentioned about) anyways, the error your getting is that it seems that your ASP.NET code can't parse the results to JSON On Mar 4, 11:02 am, Joseph Le Brech jlebr...@hotmail.com wrote: get firebug and put a breakpoint on for the line for error. Date: Wed, 4 Mar 2009 07:58:45 -0800 Subject: [jQuery] Re: Ajax Dot Net Plugin From: cakeordeat...@gmail.com To: jquery-en@googlegroups.com P.S. alert(y) gives Not Found alert(z) gives SyntaxError: JSON.parse Where do i find out what x y and z are? Thanks! On Mar 4, 3:52 pm, Jon cakeordeat...@gmail.com wrote: That's great! Thanks! Here's the error: [object XMLHttpRequest] What does that mean. I'm confused... I thought the plugin worked via JSON... On Mar 4, 3:41 pm, MorningZ morni...@gmail.com wrote: Show what the error is error: function(x, y, z) { alert(x); } should show you what the error actually is instead of guessing On Mar 4, 10:10 am, Jon cakeordeat...@gmail.com wrote: I'm trying to get the ajax dot net plugin working and failing miserably. I've added the service - both manually and by dragging the example files into my solution. I've copied the hello world function from the example solution and added it to the service and the jquery for it. I've copied the system.serviceModel into my web.config. Again, i've tried using the default one created when adding the service to the solution and i've copied it across from the example solution. But no matter what i do i can't get the ajax to work. // Hello World $.ajaxDotNet(url + HelloWorld, { verb: GET, success: function(obj) { obj = obj.d; alert('Hello World'); $(.HelloWorld).text(obj); }, error: function() { alert('Hello Error'); $(.HelloWorld).text(Error); } }); Every time i run it i just get the Hello Error alert. Does anyone know if i'm missing something essential? Am i making a stupid error? Please help, i'm dying to get this plugin working! And if i can't get this working does anyone else has any experience with JQuery and Dot Net and might be able to point me to a solution? _ All your Twitter and other social updates in one placehttp://clk.atdmt.com/UKM/go/137984870/direct/01/ _ 25GB of FREE Online Storage – Find out morehttp://clk.atdmt.com/UKM/go/134665320/direct/01/
[jQuery] Stopping slideUp/slideDown mid animation
I'm using slideUp and slideDown to animate a drop down menu. If i mouse on/off the menu in very quick succession the sliding up and down animations stack up so that when you take your mouse away from it it is still animating up and down. Is there any way to stop the animation in the same way that you'd stop animate: $(.element).stop().animate(etc... If i use .stop() on slideDown/slideUp it stops the element from expanding again beyond the size it was stopped at. I hope that makes sense. Here is my code: $(.ClientMenu).hover(function () { $(.ClientMenuBody).slideDown(medium); }, function () { $(.ClientMenuBody).slideUp(fast); }); And HTML: div class=ClientMenu div class=ClientMenuHead pby client/p /div ul class=ClientMenuBody li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li /ul /div
[jQuery] Re: Stopping slideUp/slideDown mid animation
That is exactly what i was looking for! Thanks very much! =D On Feb 25, 2:10 pm, pedalpete p...@hearwhere.com wrote: Check out the hoverIntent pluginhttp://cherne.net/brian/resources/jquery.hoverIntent.html it puts a 'pause' on the hover so for both loading and unloading the hovered section, it attempts to figure out what the user wants to do. On Feb 25, 3:57 am, Jon cakeordeat...@gmail.com wrote: I'm using slideUp and slideDown to animate a drop down menu. If i mouse on/off the menu in very quick succession the sliding up and down animations stack up so that when you take your mouse away from it it is still animating up and down. Is there any way to stop the animation in the same way that you'd stop animate: $(.element).stop().animate(etc... If i use .stop() on slideDown/slideUp it stops the element from expanding again beyond the size it was stopped at. I hope that makes sense. Here is my code: $(.ClientMenu).hover(function () { $(.ClientMenuBody).slideDown(medium);}, function () { $(.ClientMenuBody).slideUp(fast); }); And HTML: div class=ClientMenu div class=ClientMenuHead pby client/p /div ul class=ClientMenuBody li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li liimg class=DottedLine src=Images/DottedLine.gif width=150 height=2 //li li class=SlidingElementa href=#Lorem Ipsum/a/li /ul /div
[jQuery] Re: $('#foo p') or $('p', $('#foo'))
Liam, $() can take one or two arguments. The first argument is what your searching for. The second argument is the context in which you are searching. If you only use one argument, the second defaults to the whole dom. $(#foo p) searches for all p in #foo. It does this by getting every p element in the document and then selecting the ones inside #foo. The other option uses a second argument to limit the scope. $(#foo) returns #foo. $(p, $(#foo)) uses #foo as its context instead of the whole dom. Just to clarify, $(p, #foo) would be meaningless, because #foo isn't its own context. It needs to be an object returned by jquery. $ (p, #foo) would give you both all p's and all #foo's, which is not what you want in this circumstance. On Feb 24, 8:49 am, Liam Potter radioactiv...@gmail.com wrote: ok, but what in jquery knows that $(p, $(#foo)) should look for the p tags inside of #foo, why does it treat it like $(#foo p)? jQuery Lover wrote: Liam, you can use $(p, #foo). The second parameter must be a jQuery object or dom element... Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Tue, Feb 24, 2009 at 6:44 PM, Liam Potter radioactiv...@gmail.com wrote: Hi Stehpan :p I understand that, I'm just not sure why $(p, $(#foo)) is not the same as $(p, #foo) - Liam Stephan Veigl wrote: Hi Lima, 1) #foo is an ID and since IDs should be unique there has to bee only one #foo element 2) $(p, $(#foo)) selects all p elements in the scope of the #foo element. In other words, it selects every p element under #foo in the DOM tree. by(e) Stephan 2009/2/24 Liam Potter radioactiv...@gmail.com: I've been following this discussion, but I need explaining why $(p, $(#foo)) doesn't select all p tags and all #foo id's ? Stephan Veigl wrote: Hi, I've done some profiling on this, and $(p, $(#foo)) is faster than $(#foo p) in both jQuery 1.2.6 and 1.3.2. the test HTML consists of 100 ps in a foo div and 900 ps in a bar div. However the factor differs dramatically: In 1.2.6 the speedup from $(p, $(#foo)) to $(#foo p) was between 1.5x (FF) and 2x (IE), while for 1.3.2 the speedup is 20x (FF) and 15x (IE). $(p, $(#foo)) is faster in 1.3.2, by a factor of 1.5 (both FF and IE), while $(#foo p) is _slower_ in 1.3.2 by 8.5x (FF) and 4.6x (IE). Even with an empty bar div $(p, $(#foo)) is faster by a factor up to 3x. Conclusion: If you have an ID selector, first get the element by it's ID and use it as scope for further selects. by(e) Stephan 2009/2/23 ricardobeat ricardob...@gmail.com: up to jQuery 1.2.6 that's how the selector engine worked (from the top down/left to right). The approach used in Sizzle (bottom up/right to left) has both benefits and downsides - it can be much faster on large DOMs and some situations, but slower on short queries. I'm sure someone can explain that in better detail. Anyway, in modern browsers most of the work is being delegated to the native querySelectorAll function, as so selector performance will become more of a browser makers' concern. - ricardo On Feb 23, 1:08 pm, Peter Bengtsson pete...@gmail.com wrote: I watched the John Resig presentation too and learned that CSS selectors always work from right to left. That would mean that doing this:: $('#foo p') Would extract all p tags and from that list subselect those who belong to #foo. Suppose you have 1000 p tags of them only 100 are inside #foo you'll have wasted 900 loops. Surely $('#foo') is the fastest lookup possible. Doing it this way will effectively limit the scope of the $('p') search and you will never be bothered about any p tags outside #foo. Or am I talking rubbish?
[jQuery] Re: Trouble with Validation Firing in ASP.NET
You might need to change the id you're searching for to: $(document).ready(function() { $(#aspnetForm).validate({ debug: true }); }); The ID in your code behind always gets changed to 'aspnetForm'. You can check in firebug to make sure you're using the correct ID of the form. J On Feb 13, 3:27 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You can add the debug-option for debugging: $(document).ready(function() { $(#form1).validate({ debug: true }); }); Make sure the all necessary files are loaded (via Firebug). Jörn On Fri, Feb 13, 2009 at 4:17 PM, expresso dschin...@gmail.com wrote: Here is my code. I have the reference to the javascript in my Master Page so it's definitely there and I am getting no JavaScript errors when checking it out with Firebug. The problem I have is when I click submit, it's doing a postback, it's not firing the validate method: asp:Content ID=Content1 ContentPlaceHolderID=MainContentPlaceHolder runat=server script type=text/javascript $(document).ready(function() { $(#form1).validate(); }); /script div class=webform form id=form1 runat=server table tr td width=250div class=formfieldlabelem*/emBackground Color/div/td td width=150 div class=formfield_radiobuttonlistasp:RadioButtonList ID=rblBackgroundColor CssClass=radiobuttonlist repeatdirection=Horizontal runat=server //div /td /tr tr td width=250div class=formfieldlabelem*/emFirst Name/div/td td width=150 div class=formfieldasp:TextBox class=required width=150 ID=txtFirstName runat=server //div /td /tr tr td table width=100% cellpadding=0 cellspacing=0 trtddiv class=formfieldlabelem*/emNickname/div/td/tr /table /td td width=150 div class=formfieldasp:TextBox class=required width=150 ID=txtNickname runat=server //div /td /tr tr td colspan=2 div class=formrow_right table cellpadding=0 cellspacing=0 tr td width=190 div class=formrow_rightasp:ImageButton OnClick=btnAddToCart_Submit ID=btnAddToCart ImageUrl=~/images/addtoCartpng runat=server //div /td /tr /table /div /td /tr /table /form /div /asp:Content -- View this message in context:http://www.nabble.com/Trouble-with-Validation-Firing-in-ASP.NET-tp219... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Using jQuery Validation with Dot Net
Okay that's great, all working now! On Feb 11, 3:23 pm, Aaron Gundel aaron.gun...@gmail.com wrote: After looking this over, I found that the validator wasn't picking up your submit button, which isn't really a button. It's the link you use to submit. the validation plugin won't catch this because it [your link] appears to do a straight up call to form.submit(). I popped a submit button in there and all your rules started working. Hope this helps, Aaron On Tue, Feb 10, 2009 at 11:14 AM, Jon cakeordeat...@gmail.com wrote: I've set up a test site here: http://test.sunshine-design.co.uk/ I hope you can point me in the right direction, i've not had any further luck solving this! Thanks On Feb 9, 3:10 pm, Aaron Gundel aaron.gun...@gmail.com wrote: Yes, it would be helpful. Can't really see what's going on in the snippet you provided. As Rob mentioned, there's no mention of the form (even though it is there on the page). It might give some additional clues as to where things have gone wrong. On Mon, Feb 9, 2009 at 3:46 AM, Jon cakeordeat...@gmail.com wrote: @ RobG: #aspnetForm is the form that wraps the whole of adotnet page. I simply posted the html snippet from the form itself. Individual forms do not have their own form tags, there is one large one that encloses the whole page - part of thedotnetinfrastructure. @ Aaron Grundel: No, but i will put one up tonight if it will help. I'm eager to use this validation plugin! On Feb 9, 2:14 am, RobG rg...@iinet.net.au wrote: On Feb 9, 8:30 am, Jon cakeordeat...@gmail.com wrote: I'm having issues getting the validation plugin (http://bassistance.de/ jquery-plugins/jquery-plugin-validation/) to work withdotnet. Whatever i try i can't stop the form from submitting. I've tried several things i've found on this group and the web. Can anyone help me getting this to work? Here's my html. span id=ctl00_Control_LeftColumn_CF_Contact class=ContactForm p class=SuccessMessageSubmitted/p span class=Field span class=LabelName /span span class=Validation span id=ctl00_Control_LeftColumn_CF_Contact_ctl01_ctl04 style=display: none;/ /span input id=ctl00_Control_LeftColumn_CF_Contact_ctl01_TB_TextBox class=TextBox Name type=text name=ctl00$Control_LeftColumn $CF_Contact$ctl01$TB_TextBox/ /span span class=Field /span span class=Field /span a id=ctl00_Control_LeftColumn_CF_Contact_LB_Submit class=Submit href=javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact $LB_Submit','') style=background-color: rgb(51, 51, 51);Submit/a /span Invalid markup, there is no form. And here is my javascript: $(document).ready(function(){ $(#aspnetForm).validate({ Where is #aspnetForm? -- Rob
[jQuery] Validation - Adding Valid class
With the validation i have managed to make it add a class called 'Valid' to the label that the validation adds. However i want to make it add a class (same name) to the textbox too. I've managed this by doing: success: function(element) { $(element).addClass(Valid).parent(span).children(input, textarea).addClass(Valid) }, Which works fine. However if you add text to the textbox - so it's valid - then remove the text - so it's not valid - the Valid class is removed from the label but not from the textbox. Is there an easier way to do what i'm doing? Or is there a suitable place to add the code to remove the class? You can see an example of this in action here: http://test.sunshine-design.co.uk/Articles.aspx
[jQuery] Re: Validation - Adding Valid class
Thanks Rob but i'm not sure i fully understand. Do i do this within the success function? Or is there somewhere else i can do this like say: invalid: function(element) { $(element).parent(span).children(input, textarea).removeClass (Valid) } That's where i'm confused - where exactly do you tell it to remove the class? On Feb 13, 11:13 pm, RobG rg...@iinet.net.au wrote: On Feb 14, 8:42 am, Jon cakeordeat...@gmail.com wrote: With the validation i have managed to make it add a class called 'Valid' to the label that the validation adds. However i want to make it add a class (same name) to the textbox too. I've managed this by doing: success: function(element) { $(element).addClass(Valid).parent(span).children(input, textarea).addClass(Valid) }, Which works fine. However if you add text to the textbox - so it's valid - then remove the text - so it's not valid - the Valid class is removed from the label but not from the textbox. Is there an easier way to do what i'm doing? Add and remove the class on the parent span and make the rule particular to the input and textarea elements (perhaps that isn't required if they are the only descendants that will respond to the rule anyway). -- Rob
[jQuery] Re: Using jQuery Validation with Dot Net
I've set up a test site here: http://test.sunshine-design.co.uk/ I hope you can point me in the right direction, i've not had any further luck solving this! Thanks On Feb 9, 3:10 pm, Aaron Gundel aaron.gun...@gmail.com wrote: Yes, it would be helpful. Can't really see what's going on in the snippet you provided. As Rob mentioned, there's no mention of the form (even though it is there on the page). It might give some additional clues as to where things have gone wrong. On Mon, Feb 9, 2009 at 3:46 AM, Jon cakeordeat...@gmail.com wrote: @ RobG: #aspnetForm is the form that wraps the whole of adotnet page. I simply posted the html snippet from the form itself. Individual forms do not have their own form tags, there is one large one that encloses the whole page - part of thedotnetinfrastructure. @ Aaron Grundel: No, but i will put one up tonight if it will help. I'm eager to use this validation plugin! On Feb 9, 2:14 am, RobG rg...@iinet.net.au wrote: On Feb 9, 8:30 am, Jon cakeordeat...@gmail.com wrote: I'm having issues getting the validation plugin (http://bassistance.de/ jquery-plugins/jquery-plugin-validation/) to work withdotnet. Whatever i try i can't stop the form from submitting. I've tried several things i've found on this group and the web. Can anyone help me getting this to work? Here's my html. span id=ctl00_Control_LeftColumn_CF_Contact class=ContactForm p class=SuccessMessageSubmitted/p span class=Field span class=LabelName /span span class=Validation span id=ctl00_Control_LeftColumn_CF_Contact_ctl01_ctl04 style=display: none;/ /span input id=ctl00_Control_LeftColumn_CF_Contact_ctl01_TB_TextBox class=TextBox Name type=text name=ctl00$Control_LeftColumn $CF_Contact$ctl01$TB_TextBox/ /span span class=Field /span span class=Field /span a id=ctl00_Control_LeftColumn_CF_Contact_LB_Submit class=Submit href=javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact $LB_Submit','') style=background-color: rgb(51, 51, 51);Submit/a /span Invalid markup, there is no form. And here is my javascript: $(document).ready(function(){ $(#aspnetForm).validate({ Where is #aspnetForm? -- Rob
[jQuery] Re: Using jQuery Validation with Dot Net
@ RobG: #aspnetForm is the form that wraps the whole of a dot net page. I simply posted the html snippet from the form itself. Individual forms do not have their own form tags, there is one large one that encloses the whole page - part of the dot net infrastructure. @ Aaron Grundel: No, but i will put one up tonight if it will help. I'm eager to use this validation plugin! On Feb 9, 2:14 am, RobG rg...@iinet.net.au wrote: On Feb 9, 8:30 am, Jon cakeordeat...@gmail.com wrote: I'm having issues getting the validation plugin (http://bassistance.de/ jquery-plugins/jquery-plugin-validation/) to work with dot net. Whatever i try i can't stop the form from submitting. I've tried several things i've found on this group and the web. Can anyone help me getting this to work? Here's my html. span id=ctl00_Control_LeftColumn_CF_Contact class=ContactForm p class=SuccessMessageSubmitted/p span class=Field span class=LabelName /span span class=Validation span id=ctl00_Control_LeftColumn_CF_Contact_ctl01_ctl04 style=display: none;/ /span input id=ctl00_Control_LeftColumn_CF_Contact_ctl01_TB_TextBox class=TextBox Name type=text name=ctl00$Control_LeftColumn $CF_Contact$ctl01$TB_TextBox/ /span span class=Field /span span class=Field /span a id=ctl00_Control_LeftColumn_CF_Contact_LB_Submit class=Submit href=javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact $LB_Submit','') style=background-color: rgb(51, 51, 51);Submit/a /span Invalid markup, there is no form. And here is my javascript: $(document).ready(function(){ $(#aspnetForm).validate({ Where is #aspnetForm? -- Rob
[jQuery] Using jQuery Validation with Dot Net
I'm having issues getting the validation plugin (http://bassistance.de/ jquery-plugins/jquery-plugin-validation/) to work with dot net. Whatever i try i can't stop the form from submitting. I've tried several things i've found on this group and the web. Can anyone help me getting this to work? Here's my html. span id=ctl00_Control_LeftColumn_CF_Contact class=ContactForm p class=SuccessMessageSubmitted/p span class=Field span class=LabelName /span span class=Validation span id=ctl00_Control_LeftColumn_CF_Contact_ctl01_ctl04 style=display: none;/ /span input id=ctl00_Control_LeftColumn_CF_Contact_ctl01_TB_TextBox class=TextBox Name type=text name=ctl00$Control_LeftColumn $CF_Contact$ctl01$TB_TextBox/ /span span class=Field /span span class=Field /span a id=ctl00_Control_LeftColumn_CF_Contact_LB_Submit class=Submit href=javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact $LB_Submit','') style=background-color: rgb(51, 51, 51);Submit/a /span And here is my javascript: $(document).ready(function(){ $(#aspnetForm).validate({ rules: { ctl00$Control_LeftColumn$CF_Contact$ctl01$TB_TextBox: required, ctl00$Control_LeftColumn$CF_Contact$ctl02$TB_TextBox: { required: true, email: true }, ctl00$Control_LeftColumn$CF_Contact$ctl04$TB_TextBox: required } }); }); As i say above, the form just submits regardless so i'm lost on a solution!
[jQuery] Populate Form within Thickbox
On the parent page I have a list of items that were submitted to the DB from a text field form within an inline Thickbox. On each one of these items, I have an Edit link, which will also open the same inline thickbox form, however, I am unclear how to populate the form with that items saved information. My back-end developer is using Spring MVC and Hybernate if that helps at all.
[jQuery] Re: RAW PRINTING - How can I print DIRECTLY to DOT Matrix Printer from jquery?
You don't need jQuery to do this. On Oct 22, 6:00 am, Vedia [EMAIL PROTECTED] wrote: Hi! I want to sent text with javascript directly to Dot Matrix printer like Panasonic KXP-1050 without using true type fonts. As I know, this means: RAW Printing I want to use this for printing bills or ticket on continuous-form paper. There is ActiveX sample for InternetExplorer on this link:http://www.xuebrothers.net/ax/activeprinter/interfaces.htm How can I this with jQuery? Can it be possible? Regards, Nuri AKMAN
[jQuery] script tags and domManip
Is it a known issue that various domManip actions can case javascript inside script tags to fire twice? For example if I have this example div id=myDiv script type=javascript alert(Hello World); /script /div and somewhere else in the page I use the collowing jQuery: script type=javascript $(document).ready(function() { $(#myDiv).wrapAll(div class=wrapper/ div); }); /script then what happens is the Hello World alert gets triggered twice. Once when the page loads and once when the div gets wrapped. Can options be added to the DomManip functions so that it doesn't evaluate scripts tags contained in the DOM element being wrapped? (or better yet detects if the elements are already embedded in the DOM and executes then as appropriate) Thank Jon
[jQuery] Re: Stumped by AJAX and events
On Sep 4, 12:19 pm, JDawson [EMAIL PROTECTED] wrote: input type=image id=btn_recipient_search src=btn_search.gif alt=Search / $(#btn_recipient_search).click( function() { getRecipients(John, Doe); } ); i see you solved it but if you want it to work with an input you probably need to use preventDefault() try: $(#btn_recipient_search).click( function(e) { e.preventDefault(); getRecipients(John, Doe); } );
[jQuery] unfefined properties (filtering jquery by class)
My goal is to pull out all anchor tags and replace the href value with a rewritten value (based on original href). However, i am getting errors indicating that the object or property is undefined when there are no anchor tags with the given class name (which is why i used filter...) I have the following href pattern: File Library/filename i need it to be /newPath?library=File+Librarycomponent=filename This works as long as at least one anchor tag exists of the appropriate style class but not when only standard anchor tags are present. example: function rewriteFileHref() { library = $(a).filter(.changeHrefToWcm).attr(href).split(/) [0].replace( , +); id =$(a).filter(.changeHrefToWcm).attr('href').split(/) [1]; $(a).filter(.changeHrefToWcm).attr('href','/NewLocation/ WcmRenderServlet/?library='+library+'component='+id); }
[jQuery] replace href url value for anchor tag
this is probably pretty simple but trying to find documentation on how to change the href value on an anchor tag. i've seen docs that let you filter an anchor tag based on class which is prob what i'll do but i need to change the url that it is pointing to href=some/pattern/here to rewrite to ensure proper encoding (for spaces, etc.) and b/c i want to point it somewhere different. this is prob not best approach overall but data is not easy to change for me so i want to change the url. I'll need to do same thing for tags as well (point src to diff location). your help is appreciated. also looking for where documentation specifies what properties can be changed. thanks
[jQuery] Re: replace href url value for anchor tag
cool thanks. I'm having trouble applying it... I have an anchor tag like a href=File Library/IDClickity/a and i need to build an url like somewhere/?library=File +Librarycomponent=id my approach below is only happy when pattern exists (pages with normal links give js error). plus this can't be best way. $([EMAIL PROTECTED]).addClass(file); var library = $(a.file).attr('href').split(/) [0].replace( , +); var id = $(a.file).attr('href').split(/) [1]; $(a.file).attr('href','.http://somewhere.com//?library='+library +'component='+id); On Aug 28, 12:43 pm, Mike Alsup [EMAIL PROTECTED] wrote: this is probably pretty simple but trying to find documentation on how to change the href value on an anchor tag. i've seen docs that let you filter an anchor tag based on class which is prob what i'll do but i need to change the url that it is pointing to href=some/pattern/here to rewrite to ensure proper encoding (for spaces, etc.) and b/c i want to point it somewhere different. this is prob not best approach overall but data is not easy to change for me so i want to change the url. I'll need to do same thing for tags as well (point src to diff location). your help is appreciated. also looking for where documentation specifies what properties can be changed. This is a job for attr: http://docs.jquery.com/Attributes For example: $('a').attr('href','http://malsup.com/jquery'); $('img').attr('src','myimage.jpg');
[jQuery] getJSON - how do you make it work?
Hi I'm trying to get some JSON content using the $.getJSON function, but it just won't work!! I started out using ASP.NET to generate a load of JSON, but decided to create a simple text file with a JSON string in it instead. Here's my JavaScript: $.getJSON(/test.txt, function(data) { alert(I got the stuff); }); $(#msg).ajaxError(function(event, request, settings, error) { $(this).append(p + error + /p); }); And my test.txt file contains: { offer: { id: 2, title: animals could talk, image: _blank.gif } } Is there anything really obvious I'm doing wrong? Thanks Jon
[jQuery] Re: getJSON - how do you make it work?
I finally worked it out! Apparently, IIS reports a 404 for file extensions it doesn't recognise as safe, so *.json file was a big no- no. Soon as I changed it to the .txt file mentioned above (must've posted that as an idea before actually trying it in my code - oops!) it all worked. Then moving into the proper project, turns out the JSON being generated by ASP.NET was invalid (the JSON validator at JSONlint.com was my friend for that one). It's all working tickety-boo now :) Thanks all Jon On Aug 18, 2:08 pm, Ryura [EMAIL PROTECTED] wrote: Is it actually accessing the file correctly? I'd say provide a test case or check yourself with Firebug. On Aug 18, 6:00 am, Jon Sidnell [EMAIL PROTECTED] wrote: Hi I'm trying to get some JSON content using the $.getJSON function, but it just won't work!! I started out using ASP.NET to generate a load of JSON, but decided to create a simple text file with a JSON string in it instead. Here's my JavaScript: $.getJSON(/test.txt, function(data) { alert(I got the stuff); }); $(#msg).ajaxError(function(event, request, settings, error) { $(this).append(p + error + /p); }); And my test.txt file contains: { offer: { id: 2, title: animals could talk, image: _blank.gif } } Is there anything really obvious I'm doing wrong? Thanks Jon
[jQuery] Problem with Cycle plugin using random and previous
I've come across a problem with Mike Alsup's very good Cycle plug-in. This occurs when using both the random feature and a previous link. Previous will go to the previous item as it is ordered in the HTML, regardless of what appeared previously to the user in the random order. For example, if I have elements to be cycled which appear in the page code in this order: A, B, C But when randomized appear to the user in this order: A, C, B Then, if the user clicks the Previous link with B showing, the cycle will go to A, not C as the user would expect. Is there any way to achieve the expected behavior? Many thanks, Jon
[jQuery] Problem with Cycle plugin using random and previous
I've come across a problem with Mike Alsup's very good Cycle plug-in. This occurs when using both the random feature and a previous link. Previous will go to the previous item as it is ordered in the HTML, regardless of what appeared previously to the user in the random order. For example, if I have elements to be cycled which appear in the page code in this order: A, B, C But when randomized appear to the user in this order: A, C, B Then, if the user clicks the Previous link with B showing, the cycle will go to A, not C as the user would expect. Is there any way to achieve the expected behavior? Many thanks, Jon
[jQuery] Re: Problem with Cycle plug-in using random and previous
Yikes! Sorry about the reposts -- I didn't realize the group was moderated for new users. - Previous Message - From: JonDetroit Date: 7/7/08 9:36 AM I've come across a problem with Mike Alsup's very good Cycle plug-in. This occurs when using both the random feature and a previous link. Previous will go to the previous item as it is ordered in the HTML, regardless of what appeared previously to the user in the random order. For example, if I have elements to be cycled which appear in the page code in this order: A, B, C But when randomized appear to the user in this order: A, C, B Then, if the user clicks the Previous link with B showing, the cycle will go to A, not C as the user would expect. Is there any way to achieve the expected behavior? Many thanks, Jon
[jQuery] Re: click function doesn't work on dynamic content?
Might be worth looking into the livequery plugin too J On Jun 6, 1:43 am, Richard D. Worth [EMAIL PROTECTED] wrote: Take a look at: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st... If I've understood you're problem, it's a fairly common one that stems from the fact that you're adding a new element (with append('li ...) that has no click event bound to it. The article linked above has a full explanation and some good solutions. - Richard Richard D. Worthhttp://rdworth.org/ On Thu, Jun 5, 2008 at 7:31 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi there, Please see my example here:http://www.hellobenlau.net/jquery/test.htm So basically, I want to select a list item from Group A, and when the transfer button is clicked, it gets transfered to Group B. However, once transferred, the list items in Group B doesn't respond to any click function called OUTSIDE of the 'transfer' function. Im not sure if i'm explaining it properly, but this is my code: $(document).ready(function(){ var temp; // selecting $('li').click(function(){ $('li.highlight').removeClass('highlight'); $(this).addClass('highlight'); temp = $(this).text(); }); // when transfer link is clicked $('#transfer').click(function(){ $('#groupA li.highlight').remove(); $('#groupB').append('li' + temp + '/li'); }); }); Any help would be extremely helpful! Thanks!!
[jQuery] Using jCarousel functions in another script (a gallery/slide script)
I've made a slideshow (remotely similar to other jQuery slides like Frontpage Slideshow or jqGalScroll v2.1) but instead of just plain numbered links to move between slides I've used jCarousel. Clicking on the list items in jCarousel correctly shows me the proper slide in my slideshow, but I can't seem to figure out how to call jCarousel functions from my slide. For example: 1. Getting jCarousel to scroll down when my slideshow has reached the EIGHTH slide. (There are 7 jCarousel items shown at a time). 2. Having jCarousel return to the beginning when my slideshow starts over. So is there some way to call a jCarousel function inside of my slideshow JS? Something like: function showNext() { // My slideshow function which displays the next slide // vis = the number of the current slide. /* my slide code here */ vis = vis + 1; // because the slide starts at 0, but jcarousel starts at 1. if (vis = 8) { // The 8th list item is no longer seen in jCarousel (only 7 per page), need to scroll to it. $.jcarousel.scroll(vis); } } So is there some way to do this? If there is I can't figure it out.. Also, this cannot be done through a callback AFAIK. What I'm specifically talking about above doesn't use any clicks or other events, so I really don't know how I could bind an event when it's something my slideshow script automatically does. (If there is some way to create an event inside of my slide function that will be able to modify jCarousel, then please tell me otherwise). If you're wondering how it shows in the jCarousel which is selected, I simply have my slide script apply an active class to the list item which correlates with the slide. Is there any way to have jCarousel keep the active class at the top of the carousel?? I'm really looking for any way to do this by now. Thank you very much.
[jQuery] Re: when to call noConflict?
Call it before, there's some documentation here: http://docs.jquery.com/Using_jQuery_with_Other_Libraries J On May 20, 11:38 pm, darren [EMAIL PROTECTED] wrote: hi everybody I have some code where i need to use jQuery.noConflict() Do i call it before or after jQuery(document).ready() ?
[jQuery] .html() behaving differently in IE7
Hi, I'm trying to find out if this behaviour is correct, or if its something that i should submit as a bug. Using .html() works perfectly fine in all browsers, providing that the html your inserting is valid. eg. $(body).find('#id1').html(divtest content/div).show(); // alert($('#id1').html()) == 'divtest content/div' However, if i want to insert html which is invalid (just withing the string), but still might keep the total DOM valid by performing another insert immediately, then in IE7 only, it refuses to insert the html. eg. $(body).find('#id1').html(divtest content/div/div).show(); // alert($('#id1').html()) == '' Is this something that jQuery is deliberately doing, or is this a bug? Because, like i say, it works fine in Firefox. J
[jQuery] Re: attr difference in Firefox and IE7
I would upgrade to the latest version of jQuery, there's a few attribute bugfixes that could help J On May 20, 6:01 am, Sid [EMAIL PROTECTED] wrote: Hi, I'm using the .attr() to set attributes of an img tag. This works in Firefox 2.0.0.14 but not in Internet Explorer 7. The offending piece of code is $('#preview').livequery(function() { $('#preview').attr('src',previewImage); $('#preview').attr('width','302px'); $('#preview').attr('height','188px'); return false; }); Works in FF but in IE, only the src is changed. The width and height remain unaffected. To see, checkhttp://sid-deswal.110mb.comand click on 'Themes' And I can't understand the IE error message which says Line: 5 Char: 1 Error: Object Expected Code: 0 Regards