jQuery.cycle with dynamic heights
i am using the cycle plugin to fade imges that have different heights. does anyone know how i can set the height of the outer div (s1) so that it changes according to the heights of the inner divs? Or even have it to be dynamically set to be the height of the largest inner div? I don't want to give #s1 a height in the css because I have multiple html pages that use this effect, and images on all these pages will be different. HTML CODE: <div id="s1"> <div>image1</div> <div>image2</div> <div>image3</div>
[jQuery] Selecting menu items by value
I am trying to figure out how to select all the menu items that have a particular value in a form. For example, let's say you had a form with 10 different yes/no menus, and you wanted to select all of the ones that are currently set to "yes". Is there a way to do that? I tried doing something like: $("option[value='yes'][selected='true']) That seemed to always return zero results. If I leave out the 'selected' attribute in the expression, it returns the correct number of elements (10 in this example).
2 JQuery bugs I cant get rid off
Im creating a small website where I use JQuery alot. I have 2 bugs: 1. Sometimes my image dont fade in at rollover (not very offen). 2. I cant figure out how to make an link on the rollover image to activate the profilmenu to roll down. Hope your guys can help me out. see the site at http://janjuhl.lajlev.dk Best regards Michael
[jQuery] maskedinput and $;ajax
Hi all, (I dont know if the last mensage was correctly sent) I trying aply masks in one form, the mask stay in the same page of the form. This form is loaded by $.ajax function. If I understand correctly, the mask need be declared on document.ready state. So, my form does not work. how can I solve this? Thx a lot!!
[jQuery] Append before closing tag
Does jQuery provide a way to append an element immediately before the closing tag of another element? For instance, say I have the following paragraph element: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean adipiscing gravida leo. In hac habitasse platea dictumst. Phasellus auctor odio id ligula. Morbi in risus et nulla vehicula blandit. Quisque varius, enim eget interdum cursus, risus est auctor nisi, vel laoreet magna orci ac neque. But that I would like to add a link in right
[jQuery] Only one <script type="text/javascript" src="jquery/jquery-1.3.2.min.js"></script>
Hi Can you load jquery multiple times? Is there any way to only load jquery if it haven't already been included like if you use Wordpress some plugins needs and includes jquery then it can be loaded many times.
[jQuery] Add an "attribute"
Hello everybody, I have a little question about the developpement of a new JQuery plugin. (I hove it's the right place to ask ). I understood how to add method to a jquery object but I don't find how to had an "attribute" to this objet. My goal is to have attributes attached to my object to retrieve information after a second call on the same object. For example : $("#id").ofc("add", options); and next : $("#id").ofc("update"); When this update action is performed, I would like to retrieve the object
[jQuery] passing more than 1 param via click()?
Hey all, Not really sure how to ask this, so I'm sorry if my title is mis- leading. It is also why I wasn't able to find much searching, so I'm sorry if it's answered already. Basically, the code I inherited was this: <a href="#drop" class="edit-link" onclick=" removeDept('<c:out value="${key}" />','<c:out value="$ {name}" />'); return false;"
[jQuery] for all people who understand german better than english
There is a brandnew german jquery-forum: http://www.jquery-board.de I hope a lot of german understanding people will help to expand the new german community! Thanks for your help, Greetings, Veela
for all people who understand german better than english
There is a brandnew german jquery-forum: http://www.jquery-board.de I hope a lot of german understanding people will help to expand the new german community! Thanks for your help,
[jQuery] Can not get Select
<select name="licenseeID" id="licenseeSelectID" /> <table><tr><td>Select</td><td>FileName</td><td>Date</td></tr> </table> <div id="tablediv"></div> <font>Company:</font> <font id="singlecompany" style="display: none;"></font> <select name="companyID" id="companySelectID" WIDTH="130px" /> <font>Division:</font> <font id="singledivision" style="display: none;"></font> <select name="divisionID" id="divisionSelectID"/> i can reference the fist select 'licenseeID' and populate it. but the third 'divisionID'
[jQuery] Hi !
Có một người bạn của bạn đã giới thiệu email của bạn và muốn bạn cùng tham gia với người ấy tại <a href="http://enghe.info">http://enghe.info</a> với thông điệp như sau: "Hôm qua tớ có ghé thăm website này ... nó thật tuyệt ... cậu có thể ghé thăm để tìm hiễu về nó .... <a href="http://enghe.info">http://enghe.info" </a> Tại sao bạn ko nghe lời bạn của bạn và tham gia thử nhỉ ! <br clear="all">Lời nhắn từ Enghe.info: Hiện tại website đang trong quá trình phát triển (beta) nên chưa thật sự có nhiều
the problem of submitHander in jquery.validate.js
Can anyone help to see what is wrong with this code. Many thanks $("#wu").validate({ submitHandler: function(form) { rules: { amount: { required: true, number: true, max: 5000, min: 1 }, //end of amount charge: { required: true, number: true, // max: Number($('#amount').attr('value')) //max: Number($('#amount').val()) }, //end of amount code: { required: true, number: true, minlength: 10 } //end of amount }, messages: { amount: { require: "Require field", number: "Please enter correct numbers format",
[jQuery] show element if class matches current body id (Please help) « View previous topic :: View next topic » Author
hi Im new to jquery and having some trouble adapting the code below. the function is for a accordion menu. I want it to recognize the body's id, and show the sub menu who's class matches the body id. right now it is set to show the submenu with class="test". function initMenu() { $('#menu ul').hide(); $('#menu ul.test').show(); $('#menu li a').click( function() { $(this).next().toggle(); } ); } $(document).ready(function() {initMenu();}); do i start with something allong the lines of var bodyid =
[jQuery] How to Enable a Disabled Context Menu
I've disabled context menu, on page ready, using the following code: function contextMenu(e){ return false; } function disableContextMenu() { $(document).bind("contextmenu", contextMenu); } Now I cannot enable it with unbind function: $(document).unbind("contextmenu", contextMenu); Thanks, Mohsen.
[jQuery] Modifying tooltip.js (bassistance.de)
Didn't know if there was an easy way to do a replace-all, to accomplish this. Basically, I wanted to use tooltip for my Wordpress blog, however the requirement for using jQuery in that environment is to -not- use $ ("elem"), but instead jQuery("elem"). Can I do a global replace in jquery.tooltip.js from $ to jQuery ? Tried so far, but no go. ( the actual result is that the tooltip does not appear, only the default browser tooltip - did not get error messages) I already checked : http://docs.jquery.com/Plugins/Tooltip/tooltip#options
[jQuery] Slide to part of a Page
how can i slide down to part of a page (say an <a> or div#with-id tag)? u know those horizontal or vertical sites?
[jQuery] Unable to refer to a select element
Hi, I am trying to populate 3 selectboxes - one with years, months and dates. The problem is that I keep getting a Javascript error in Firebug. This is what I try: I have this select: <select name="yearFrom" style="visibility: hidden;"></select> // later I set the select property to true and I try to fill it like this: function initDateFrom(){ var dateNow=new Date(); var yearFrom=$(":input[type=select][name=yearFrom]"); var monthFrom=$(":input[type=select][name=monthFrom]"); var dayFrom=$(":input[type=select][name=dayFrom]");
[jQuery] show if class matches current body id
Hi im trying to adapt the following function so that if the ul class matches the body's id it will show. Right now it is set to show the ul with the class 'test'. This is for an accordion menu, and would allow the same menu to be an include on all pages. and the appropriate segment would open. function initMenu() { $('#menu ul').hide(); $('#menu ul.test').show(); $('#menu li a').click( function() { $(this).next().toggle(); } ); } $(document).ready(function() {initMenu();}); any suggestions? Thanks!
[jQuery] Temporarily ignore user input
Hi, I'm trying to find out how to temporarily ignore user input while a search is in progress. The following is the desired behavior. (1) User enters some information (e.g. name and age). (2) User clicks on the search button. (3) $.post() to execute a search in the background. (4) Show a "search in progress" image in the search area. (5) Ignore any user input while the search is in progress. (6) When the search is done, hide the "search in progress" image and process user input again. I'd like to
[jQuery] Any reason why this section of code shouldn't work?
<div clear="all">I know this is out of context, but assuming everything is correct...is anything wrong with this code?</div> <div clear="all">I get data in Firebug, no errors, but none of the code below is written into the DOM...</div> <div clear="all"> </div> <div clear="all">Thoughts?</div> <div clear="all"> </div> <div clear="all">Thanks,</div> <div clear="all"> </div> <div clear="all">Rick</div> <div clear="all"> </div> <div clear="all">-------------------------------------------------------------------------- </div>
jQuery works fine locally but not so great online
Hello, I'm not very experienced with jQuery and I'm trying to use it on a website: www.fallinlovewithphotography.com On my computer (Mac OS X with MAMP) works fine but online the photos I'm trying to slide get resized. Can anybody tell me what i'm doing wrong or what can be the issue? Thank you, Alex
cross domain $.ajax call only works when javascript alert()
Hi knowledgeable people function ajaxaddress(theForm) { cb = "createorder=true" + "&"; cb = cb + "delivery=" + theForm.delivery.checked+ "&"; cb = cb + "deliveryname=" + theForm.deliveryname.value; $.ajax({ type: "GET", url: "http://myurl/post-order.php", data: cb, dataType : "jsonp" }); //alert("here"); } This function does not call my post-order.php script UNLESS I uncomment the alert("here") line when everything starts working fine. I'm attempting
[jQuery] selector speedup
Hi all I profiled my script with firebug and have seen that the "filter()" function is called very often. As far as I see this function is called when i use a selector like $("table[name="+name+"]")... Is there a possibility to speed that up? In XSLT there is the "key" function. see: http://www.w3schools.com/xsl/func_key.asp It's used to make XPATH queries fast. Is there a function like xslt:key for selectors in Jquery? thanks Bernhard
[jQuery] Syntax
Hi, I've learned jQuery & javascript pretty recently. That being said, I'm not entirely confident in my syntax. I've just recently completed some jQuery and it works perfectly in all browsers except IE6. I'm guessing because IE6 is more strict. Anyways, would anyone mind looking through this piece of jQuery, and verify that I'm writing everything correctly? For a demo, you can go to http://cyberantix.org/demo/portfolio/index.html Or my javascrip (I'm using the color and cookie plugin): $(function()
Retrive Data
i use jquery message ticker to display the message, but whether it is possible that a new messages to display without refresh with jQuery? jquery.js (function($) { $.fn.SmS = $.fn.sms = function(delay) { delay = delay || 4000; initTicker = function(el) { stopTicker(el); el.items = $("li", el); // hide all items (except first one) el.items.not(":eq(0)").hide().end(); // current item el.currentitem = 0; startTicker(el); }; startTicker = function(el)
[jQuery] How to rotate image (in degrees)?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000066"> <font face="Helvetica, Arial, sans-serif">Is there a jquery plugin that will allow an image to be rotated by say 90 - 180 degrees? I'm using it in my background (multiple times) and I want it to appear in different places and rotated so it doesn't appear to be the same image. TIA </font> </body> </html>
[jQuery] Merge 2 divs [jQuery]
Hi all, I have 2 divs. How I can merge this 2 divs (first div I have after $.load like this $("#div1").load("file.php")) by jQuery? I was trying .append, .appedndTo, but it's not working. May be Am not properly trying. $("#div2").append($("#div1")); $("#div2").append($("#div1").html); $("#div2").append("#div1"); $("#div1").appendTo($("#div2")); $("#div1").appendTo($("#div2").html); $("#div1").appendTo("#div2"); Sorry, I just study learn jQuery. Thanks.
[jQuery] CMS book question
Has anyone here used this book? : Drupal 6 JavaScript and jQuery I don't know much about using a CMS, but do see alot of call for them in job postings... is drupal pretty good or is there a better CMS to use/learn? Cheers, Calvin
jQuery ajax + html() not working
Hi there, I got an issue with jQuery html() in all IE browsers. It works fine in other browsers like Firefox and Safari. My JS: $(document).ready(function(){ defaultForm(); function defaultForm(){ $("#curlWrap .curlForm .button").click(function () { var longURL = $('#curlWrap #longUrl').val(); if(longURL != 'http://'){ $("#curlWrap .msg").empty(); $("#curlWrap .loading").show(); $.ajax({
[jQuery] non-DOM usage? (Rhino in the wild)
Hi folks. Apparently jQuery can not be used outside the browser .. or at least without a DOM: Rhino 1.7 release 2 2009 03 22 js> load('/Users/owen/local/jquery-1.3.2.js'); js: "/Users/owen/local/jquery-1.3.2.js", line 613: uncaught JavaScript runtime exception: ReferenceError: "document" is not defined. Yes, I know that env.js fakes a DOM, but that has to be tested each new release of jQuery, and often requires an upgrade to env.js. So here's the question: is there a way to build a non-DOM jQuery
show element if class matches current body id (Please help)
hi Im new to jquery and having some trouble adapting the code below. the function is for a accordion menu. I want it to recognize the body's id, and show the sub menu who's class matches the body id. right now it is set to show the submenu with class="test". function initMenu() { $('#menu ul').hide(); $('#menu ul.test').show(); $('#menu li a').click( function() { $(this).next().toggle(); } ); } $(document).ready(function() {initMenu();}); do i start with something allong the lines of var bodyid =
[jQuery] Menu Hover and Selected
Hi I have the following jQuery code, but it doesn't seem to work 100%: $('.nav a img').hover( function(){ if($(this).attr("src").indexOf("_on") == -1) { var newSrc = $(this).attr("src").replace(".png","_on.png"); $(this).attr("src",newSrc); } }, function(){ if($(this).attr("src").indexOf("_on.png") != -1) { var oldSrc = $(this).attr("src").replace("_on.png",".png"); $(this).attr("src",oldSrc);
[jQuery] Menu Hover and Selected
Hi I have the following jQuery code, but it doesn't seem to work 100%: $('.nav a img').hover( function(){ if($(this).attr("src").indexOf("_on") == -1) { var newSrc = $(this).attr("src").replace(".png","_on.png"); $(this).attr("src",newSrc); } }, function(){ if($(this).attr("src").indexOf("_on.png") != -1) { var oldSrc = $(this).attr("src").replace("_on.png",".png"); $(this).attr("src",oldSrc);
How do I change .click() for multiple links?
Hi I have a <ul> with some "<li><a href="xxx"></a></li>"s in it. I want to change what happens when you klick any of those links. I tried: jQuery.each($("#services ul li a"), function(index, value) { //alert("index: " + index + "\nvalue: " + value); value.click(function() { select_item(index); }); }); This should call select_item() with an id when clicking any of the links, nut it just won't work. When I uncomment the alert I can see 'value' is not the <a> element, but
[jQuery] Form Submit Button to be activated when the fields are modified
Hi guys, I'm kind of new to jQuery and what I'm trying to fogure out is this. What I'm trying to achieve is to have the submit button of a form, that may or may not be filled in with some content when the page is loading, and only have the Submit button activated when something is filled in (if the form was empty) or when something is modified in one of the form's fields (if there was something filled in). Is there a jQuery plugin that provides this functionality, or would it be possible to code
[jQuery] How can i access iframe content... and manupulate the elements from jquery script from parent ?
Need help!! How can i access iframe content... and manupulate the elements from jquery script from parent ? any ideas... ??
jquery login
Hi everyone, I've been trying to make a login form using jquery, I've been stuck for some time, I don't know what I'm doing wrong, any help would be appreciated. login.js $(document).ready(function() { $("#login").submit(function() { //remove all the class add the messagebox classes and start fading $("#msgbox").removeClass().addClass('messagebox').text('Validating....').fadeIn(1000); //check the username exists or not from ajax $.post("/login.php?cmd=login",{ user_name:$('#user').val(),password:$('#password').val(),rand:Math.random()
[jQuery] JCarousel - Changing scroll-direction
how do i change the scroll-direction of jcarousel? in horizontal mode the images scroll from right to left, but I want them to move from left to right… Thanks in advance, papillon
[jQuery] Using $.load() and $.blockUI [blockUI.js]
Hi all, how I can add content from div to div? For example, I have code: ...... <script type="text/javascript"> <!-- $(document).ready(function() { $("#showDialog").click( function() { $("#container").load('wait.php?ID=374&NUMBER=1'); $.blockUI({ message: $("#approve"), css:{width:"275px"} }); } ); $("#yes").click(function() { $.unblockUI({fadeOut:200}); $.blockUI({message: "<h1>Remote call in progress...</h1>"}); }); $("#no").bind("click", $.unblockUI); } ); // --> </script> ..... <body> <div id="container"
Next Page