[jQuery] if opera...... else
Hi, I would like to output the followin content if the browser isn't opera: <ul id="navigation"> <li class="homelink" onclick="homeSlide()">home</li> <li class="aboutlink" onclick="aboutSlide()">about</li> <li class="portfoliolink" onclick="portfolioSlide ()">portfolio</li> <li class="serviceslink" onclick="servicesSlide()">services</ li> <li class="contactlink" onclick="contactSlide()">contact</ li> </ul> If the browser
[jQuery] validate - if "other" checked --> require input box
I have a "How did you hear about us?" with a series of checkboxes that is working great, however there is an option for "Other", where they can fill out their answer. I want to modify the script so if the checkbox for Other is selected, they are required to fill in the input box. I have this working here, but I cant get the input box to be required if "other" is selected: http://psylicyde.com/misc/jquery-validate/demo/test.html -- View this message in context: http://www.nabble.com/validate---if-%22other%22-checked---%3E-require-input-box-tp25530536s27240p25530536.html
[jQuery] Each function gives errors in IE6
I've got a simple each function that finds every subnav and assigns it a vertical position equal to half of the subnav's height. This works great in all modern browsers, but in IE6 I get errors from each of the two lines within the function. Here's the problem function: $(".subnav").each(function(i) { top = (parseInt($(this).height()) / 2) - 6; $(this).css("top", ("-" + top + "px")); }); When I view the page in IE6, I get an error saying "Not implemented". If I comment out
[jQuery] Unlock Documentation
The documentation is going to remain in its sorry state if they do not unlock it and allow competent technical writers to update it. There is no excuse, for example, for not describing the copy/move behavior of the append function. One in a mountain of necessary documentation updates.
[jQuery] Fancybox from alt text
hi, im trying to wrap a fancybox link around each image on a site, which has an alt tag specified. Right now i have this html markup: <img src="1_s.jpg" alt="1_b.jpg" title="asdasd" /> And this javascript-code: $(document).ready(function() { $("img[alt]").each(function(){ $(this).wrap($('<a href="'+$(this).attr('alt')+'" class="fancyBoxImage">')); }); $(".fancyBoxImage").fancybox(); }); And it's working perfect in every browser, except IE7 and 8 (haven't tested it in IE6 yet). Does anybody has a
[jQuery] load callback doesn't wait for completion
How do I get the callback for load() to wait until the load is complete?
id doesn't seem to recognize my scripts
I am new to jquery and javascript. I am working on a user interface for a web app. Everything works great in Safari, Firefox, Chrome etc. But nothing works in IE. It's as though IE doesn't even recognize my scripts. I can't figure it out. Necessary links below. Test Site: http://www.divinefiat.com/Invoice/ Scripts: http://www.divinefiat.com/Invoice/scripts/resize.js http://www.divinefiat.com/Invoice/scripts/selection.js http://www.divinefiat.com/Invoice/scripts/tabs.js Any help would be appreciated.
[jQuery] IE not recognizing my scripts.
I am new to jquery and javascript. I am working on a user interface for a web app. Everything works great in Safari, Firefox, Chrome etc. But nothing works in IE. It's as though IE doesn't even recognize my scripts. I can't figure it out. Necessary links below. Test Site: http://www.divinefiat.com/Invoice/ Scripts: http://www.divinefiat.com/Invoice/scripts/resize.js http://www.divinefiat.com/Invoice/scripts/selection.js http://www.divinefiat.com/Invoice/scripts/tabs.js Any help would be appreciated.
[jQuery] jquery.embedquicktime.js
Anyone know how to contact the author of this plug in? Every time I try to send him a question on his site form, it says it was rejected as spam. Or are there any other experts on this plugin out there? I need to figure out how to reverse the replacement that happens when the quicktime controller comes up. Meaning, when I click on another play button on the screen, I'd like for the previous one to go back to it's pre-clicked state. Thanks.
.get not working with Webkit browser
Total newbie problem, but 4 hours of googling, messing around and getting vampire eyes hasn't led me to a solution... This works on FF, but not on Chrome/Safari. (function($) { $.fn.followUser = function(userId) { $('#' + userId).fadeOut(250, function(){ $.get("profile.php", { do: "addfriend", id: userId }); jQuery('#' + userId).html('<p>Follower added</p>').fadeIn(250); }); } })(jQuery); <div id="2"> <a onclick="$().followUser('2')">test1</a>
[jQuery] Documentation Recommendation
It should be noted that you are able to pass in jQuery objects to html () (and probably the others append() ...)
[jQuery] $(document).resize bug?
hello: I'm trying to do this: $(document).resize(function(){alert('yea')}); but doesn't work on firefox or chrome, only work fine on IE (WTF!) I'd tryied $('body').resize... but happen the same. $(window).resize work fine but i need to detect when the body's height has been changed by ajax. ideas?
[jQuery] Load quicktime as needed
I'm a total jquery newbie and I'm just trying to find out if something is possible. If I have a full album worth of songs that I want to list on a web page, can I use jquery to only embed the quicktime file after the user clicks on a play button for that track. Similar to Amazon's or iTunes play button per track. The way I'm doing it right now, every song is embedded and therefore is progressively downloading and soaking up bandwidth even though the user may only listen to one song (or none). Essentially,
[jQuery] jquery slideshow
Hi, I want to use jquery slideshow. I have a side menu bar with 15 different options. When I choose an option from menu bar, different slide shows must appear in the same div. I would really appreciate if any body can help me with this. Shravan. <input id="gwProxy" type="hidden"><input onclick="jsCall();" id="jsProxy" type="hidden"><div id="refHTML"></div>
[jQuery] (validate) submit form in lightbox?
Hello all, I have a form that opens up in a lightbox (shadowbox to be exact). And I'm having a heckuva time to get the form in the iframe to submit. i'm using the submitHandler option within the validate plugin like so: submitHandler: function(form) { form.submit(); var s = window.parent.Shadowbox; s.open({ player: 'iframe', title: 'Thank you!', content: 'http://www.somesite.com/includes/thank_you.php', width:
[jQuery] problem with $('.class').animate({scrollTop: x}) in Safari
Hello, I have a problem with safari behaving weird with a custom Slider I'm making, what it does is like reseting the scrollTop value to 0 when jumping from one item to other making the animation look pretty bad, the behavior in FF is as expected. The code is here: http://pastie.org/630593 Cheers and thanks
[jQuery] XHTML or HTML when creating elements?
According to the jQuery documentation we're supposed to write like this: $("<span/>") and not like this: $("<span>") http://docs.jquery.com/Core/jQuery#htmlownerDocument That means using XHTML style code for the elements created. Are we supposed to do that even when we are using HTML style code (e.g. HTML 4.01)? E.g.: $('#whatever').html('<img alt="" src="..." />'); That would seem a bit bizarre if the actual HTML page has lots of '<img alt="" src="">' without the ending slash. It does seem that
[jQuery] Parse encoded HTML in XML <content> node
Hi, I'm using $.ajax with a dataType of xml. The XML document I'm getting has a <content> node that contains a bunch of encoded HTML. Sample: <content><p><a href=" When I alert the text contained within the <content> node: alert(data.find('content').text()); I can see the above encoded content as formatted HTML: <a href=" I realize that the text() function is returning text, and not the nodes within. How can I return the nodes within, either as a jQuery object or the DOM nodes themselves,
Can't add .fadeIn effect
Any jQuery experts here? if(msg == "OK") { result = '<img src="/images/sent.png"><br />Your message has been sent'; $("#fields").hide(); $(this).html(result); } I spent several hours trying to add .fadeIn effect to the result so that the result doesn't appear immediately, but fades in. No success. Can somebody help? Thanks.
Trying to embed two queries--PLZ HELP ME
[/i][/b] I am struck with this code Actually what i was trying to make a page that have lava lamp and one of the accordion jquery I am not able to embed to jquries in one html file PLZ HELP here i am posting a code i was trying <html> <head> <link rel="stylesheet" href="demo.css"/> <link rel="stylesheet" href="lavalamp_test.css" type="text/css" media="screen"> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="chili-1.7.pack.js"></script> <script type="text/javascript"
Draggable collision problem
Hi guys, I don't have any trouble with the draggable function but I want to create a field with images/divs/ul etc. If I drag an image you can drag it on an other image. That isn't what I want, the image should snap against an other image. This function isn't integrate in jquery. How can I solve this? Greetz Frank
[jQuery] Tabbed data views, without IDs
Hello, I've looked at a couple of tutorials focused on having some sort of clickable elements that emulate tabs - hiding all but the div associated with that element. Both of those tutorials focus on adding IDs to the elements involved and a handler for each. This is rough on a web app that is developing these data on the fly, so I'm looking for a more generic solution. I've two ideas, one I'm not sure is possible and the other feels like cheating (the "this might break in some browsers" kind of
slidedown menu
I am trying to do an slidedown menu with hover function: Javascript: $(document).ready(function(){ $("#rightmenu ul li").hover( function () { $(this).find("ul:first").stop(true, true); $(this).find("ul:first").slideDown(); }, function () { $(this).find("ul:first").slideUp('fast'); } ); }); HTML: <div id="rightmenu"> <ul id="ulmenu"> <li> <a href="#">סנן לפי סגנון</a>
[jQuery] Disabling parent link if children present
Hi, Is it possible to 'deactivate'/nullify a top-level link in an unordered list if child links exist in that list? For example, I have the following: - Link 1 - Link 2 - Link 3 - Link 4 - Link 4a - Link 4b - Link 4c - Link 5 And I want to knock out Link 4 because it has sub-items. Is that possible? Thanks, osu
[jQuery] slidedown menu
I am trying to do an slidedown menu with hover function: Javascript: Code: $(document).ready(function(){ $("#rightmenu ul li").hover( function () { $(this).find("ul:first").stop(true, true); $(this).find("ul:first").slideDown(); }, function () { $(this).find("ul:first").slideUp('fast'); } ); }); HTML: Code: <div id="rightmenu"> <ul id="ulmenu"> <li> <a href="#">סנן לפי סגנון</a> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </li> </ul></div> It works fine in IE, but not in FF(it doesn't shown at all)
[jQuery] cycle plugin and dropdown menu
Hi i'm using the cycle plugin below a dropdown. Problem is that the" dropdowns" stay behind the slideshow. They have position absolute and higher z-index than the slideshow. Any solution? http://www.francesconizzola.it/_demo/ Thanks Vitto
[jQuery] Find top-level elements
Working on WinXP in FireFox 3.0.14 with JQuery 1.3.2, I'm trying the following code: $.ajax({ url: "http://foo.bar/document" data: 'r=' + Math.random(), success: function(value) { var body = $(value).find('body'); // Always empty var form = $(value).find('form'); // Always empty var p = $(value).find('p'); // Actual paragraphs } }); Now, "body" and "form" are always empty, while "p" contains actual paragraphs. When I debug $(value) with Firebug, I see that it has become an array with some text nodes
[jQuery] Trouble with backgroundPosition Plugin
Having some trouble with this plugin. I've tried in both IE8 and FF3, but it doesn't seem to work. Basically the background position isn't moving... the function toArray(strg) is suppose to return the following.... return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]]; this is the line where I'm getting an error code. The values res[2] and res[4] are coming back as NaN. I'm not sure what these values represent, or why they are Null. I'm calling the backgroundPosition like this: $('#nav
[jQuery] Fix for Giva Labs linkselect plugin
We noticed an issue with the jquery.linkselect plugin (version 1.2.08) today. When the container width would cause it to be positioned off the the screen it is repositioned incorrectly if there is no title element. I fixed this in anchorTo function by instead adding the width of the anchor if there is no title: // Replace pos.left = (pos.left - $container.outerWidth()) + $title.outerWidth(); // With if($title.length) { pos.left = (pos.left - $container.outerWidth()) + $title.outerWidth (); }
[jQuery] Changing a class name without clicking
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] jqTransform + validate bassistance plugin
Hi, i've a problem with input radio validation. I've two radio (accept and don't accept) for the privacy and obviously the users have to click "accept". Here my code: $("#formContactPage").validate({ errorLabelContainer: $("p.error"), rules: { denominazione: "required", cognome: "required", jtitle: "required", comune: "required", tel: "required",
[jQuery] .click() fires my callback more than once
Hi guys, I'm facing this little problem, I've got a button toolbar, and users can select rows in a table. When they have selected some row's, they can click one of the buttons, and it invokes a callback. Problem is, when I click the first time, there's nothing wrong. But when I click the second time, it fires the callback two times, when I click the third time it fires the callback three times, and so on. That's a big problem, since the button is used to delete a page, and obviously it should delete
[jQuery] Validate Text Field onblur (Bassistance Validation Plugin)
Anyone have an example on how to get the Bassistance Validation Plugin to validate text inputs onblur, I thought it did this by default but it is not happening for me. Thanks, Dave Buchholz.
[jQuery] (autocomplete)
I am using the jQuery plugin autocomplete on an country input field: I got this php array with countries in dutch: $global_countries = array(); $global_countries['AF'] = 'Afghanistan'; $global_countries['AX'] = 'Ålandseilanden'; $global_countries['AL'] = 'Albanië'; ... Then php implodes the array and evals a html file to fill the js var. This is in my html file: var countries = [$countries]; $("#country").autocomplete(countries, { minChars: 2, max: 12, autoFill: false,
jQuery tabs not working?
Hi all, I’ve recently been working on a design that I've been coding, but I’ve been having difficulty implementing jQuery tabs for a feature region on the homepage. It seems that the script isn’t loading or something. If anyone would be able to assist me in understanding why this is not functioning, it would be greatly appreciated. I’ve also looked into editing the style sheet that powers both the tabs and a accordion that is on the Help page, but its so huge I have no idea where to begin
[jQuery] [Autocomplete]autocomplete in textarea
hi guys i had used jQuery autocomplete in a textarea i want the suggest results show in where i'm typing, not outside the textarea. i checked jQuery autocomplete source code, finding in line 722 is the core code. show: function() { var offset = $(input).offset(); element.css({ width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(), top: offset.top + input.offsetHeight, left: offset.left }).show(); top and left are what u want to change. but i don't know how
[jQuery] Combining functions?
Hi all, I'm new jquery. I'm trying to create a photo gallery/slideshow using the cycle plugin. There will be three elements, a large graphic, a text section, and a thumbnail gallery of the large graphics. I have the large graphics and thumbnails connected (so when you click on the thumbnail the correct photo comes up), but can't seem to connect these elements to the title and text for the photo. The goal is to click on the thumbnail and have it bring fade the graphic and the text! So far here is
[jQuery] [autocomplete] auto complete based on additional input value
I'm using one of the examples from the demo files as a template. Basically I'd like to auto suggest hospitals based on the zip code that's entered from another input. Can someone recommend how do accomplish this? TIA This is the local data set: var hospitals = [ { name: "hospital 1", zip: "00001"}, { name: "hospital 2", zip: "00002"}, { name: "hospital 3", zip: "00003"}, { name: "hospital 4", zip: "00004"}, { name: "hospital 5", zip: "00005"}, ... and here's the autocompleter: <script> $(document).ready(function(){
jQuery error in IE: Unexpected call to method or property
I'm using jquery-1.3.2.min.js and everything works perfectly in browsers other than Explorer... It's not liking this part: this.appendChild(E) function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})} ... } I get this error: Unexpected call to method or property access. jquery-1.3.2.min.js, line 12 character 2305 Any clue how to deal with this and make it go away???
.Animate backgroundPosition 0px -81px - JUMP (No Animation)
Hello guys! First off, BIG cookie rewarded to the one who answers this question. Ive worked with .Animate before. I am having a problem with this new animation i am trying to pursue. I want the backgroundPosition to animate in the Y-Axis -81px apon mouseover and back to 0PX apon mouseout. In the event of a mouseover, the animation of the backgroundPosition just jumps to the position of -81px with no animation. On mouseout, the backgroundPosition jumps to back to original position being 0px. HTML
Next Page