[jQuery] Help refactoring code for css sprite animation
Sorry if I posted this twice, I've just joined and got told I couldn't post messages by google groups. Think I have joined properly now though. I have a css sprite which I have finally managed to figure out how to animate. All is well, except that there is a lot of repetition in the code and my Software Engineering background is screaming at me telling me to refactor and get rid of the duplication in the code. <code> $(document).ready(function(){ $('#mjcwalk').css( {backgroundPosition: '0 0'} ) .fadeOut('slow',
finding the state of slideToggle
I have a slideToggle functioning just fine on my page: http://www.viktorwithak.com/Test/nav/ But I'm trying to get it to set a cookie that remembers what is closed and what is open. So, step one, I'm trying to determine (on click) what the state of slideToggle is. Here is my code so far... function initMenu() { $('#groups ul').hide(); $('#groups li a').click( function() { $(this).next().slideToggle('normal'); var id = $(this).attr('id'); if ($(this).next().is(':hidden'))
[jQuery] finding the state of slideToggle
I have a slideToggle functioning just fine on my page: http://www.viktorwithak.com/Test/nav/ But I'm trying to get it to set a cookie that remembers what is closed and what is open. So, step one, I'm trying determine (on click) what the state of slideToggle is. Here is my code so far... function initMenu() { $('#groups ul').hide(); $('#groups li a').click( function() { $(this).next().slideToggle('normal'); var id = $(this).attr('id'); if ($(this).is(":hidden"))
[jQuery] load progress on background image...
Is it possible to detect this? I've searched everywhere. What i have is an image gallery that changes the background image, so it will be liquid with different resolutions. Id like to trace it so i can attach a load image and text. $("#leftCol").css("background-image","none").hide().css("background- image","url("+imagePath+")").fadeIn(2000);
[jQuery] Toggling that degrades gracefully
Hello guys. I have this code (simplizied and without irrelevant here <th><tbody> etc. code): <table> <tr class="section_head"> <td>name</td> <td>value</td> </tr> <tr> <td colespan="2"><div>some stuff....</div></td> </tr> </table> I want to "show/hide" non-classed tr when clicking on "section_head" table row. $(document).ready(function() { $('.section_head').click(function(){ $(this).next().toggle(); }); }); This works and everything is fine. BUT! To make it as requested in design I need all toggled
[jQuery] Error when trying to load the carousel.html
i copied over the files into a directory on my webspace and get the following error when trying to access the carousel.html. Error on the jquery.agile_carousel-beta.1.zip: Fatal error: Call to undefined function: filter_var() in /homepages/14/ d227853429/htdocs/caro1/make_slides.php on line 9 Error on the jquery.agile_carousel-beta.2.0.zip: Fatal error: Call to undefined function: filter_var() in /homepages/14/ d227853429/htdocs/caro2/make_slides.php on line 17 macmike
[jQuery] [sites using jQuery] adobe.com
dunno if anybody noticed, but adobe is using jQuery on some of their pages: http://opensource.adobe.com/wiki/display/site/Projects dennis.
jquery nested tree sortable
Hi! I have spent the past few days lookinf for a solution in jquery to sort and serialize the data (to send to a php script) of a multiple nested tree. Something like in this example unfortunately I haven't found anything, I have seen a few valid things but non of them are capable of multilevel nesting Any ideas?
[jQuery] Validate with bassistance local bug
On this demo: http://jquery.bassistance.de/validate/demo/milk/ I cant get the email validation to work on the second try locally. The above link works fine. If you submit an invalid email address it asks you to reenter it. Great. So I try to move it locally. I downloaded jQuery and the validation plugin. Everything works... except if I try an invalid email.. it throws an error, so I fix it to a valid email and hit submit... nothing. As a second try, I visited the above link, and downloaded the entire
[jQuery] Unable to select input by value with variable
Hello, I have a form with lots of radio buttons that all have the same name. I want to select the one that was clicked by its value. What I am doing is this: <script type="text/javascript"> $(document).ready(function() { $('input[name="weAreAllCalledTheSame"]').click(function () { if ($(this).attr('checked')) { iwasclicked = $(this).attr('value'); alert ($('input[@value=iwasclicked]').length); alert (iwasclicked); }; }); }); </script> The variable iwasclicked has shows
Cycle through div's (jump to 1st when leaving the last)
Problem and goal I'm trying to cycle through some div's at the bottom of my page. The arrow on the right shows the next div and hides the current one. Where I'm stuck is getting the script to display the first div again when the last one is visible (after clicking ofcourse). I'm trying to cycle the whole thing, but I don't know how to achieve this. Website: Sorry, had to remove the link due to indexing problems with Google HTML <div id="details"> <div class="u-detail green"> <h3>Perfect
[jQuery] simple wizard: stuck with first jquery usage
Hi, I would like to make a simple wizard. I have gotten as far as hiding all divs aside from the first, and inserting the next and back buttons. I'm having problems assigning click function to next/back next should hide current div and revel next div back hides current and revels previous markup (simplified): <div id="content"> <div class="step-one"><form></form></div> <div class="step-two"><form></form></div> <div class="step-three"><form></form></div> </div> jquery: $(document).ready(function()
[jQuery] forms
hello, right upfront, please let me apologize for my ignorance. i'm a server dude and got stuck with some front end work and obviously too stupid not only to figure it out but even to formulate the question. hence, let me give my "need" statement: i need an input form that gathers user info including one or more addresses. on top of it, i need to return these inputs in a hash table -like structure, e.g. {'username':'joe', ...{'street':"some lane', 'city':'some town', ...}, {'street':'dad's place',
[jQuery] Superfish navbar for Wordpress
Hi there! First, I just want to say thank you for Superfish that is a truly great navigation component (maybe THEgreatest)! I have integrated Superfish with Wordpress and it works really smooth. But when I made a design with a navbar and tried to find a working solution I just failed. Superfish is working to 90% but it will not keep the current submenu open if only the main menu level item is selected. The reason for this is that Wordpress uses two (three) different 'current' classes: 'current_page_item'
[jQuery] [VALIDATE] - Submit button is missing from post if i use remote method
Hi Jörn , I am facing a problem in validate liberary using remote method, i am not sure if i am doing something wrong or its a bug. here is demo link of my form : http://www.zanetinewebdesign.com/demo-register.php Remote validation is used on 3 fields Email , Username , and city + state + zip zanetine@gmail.com is invalid value for Email field ; message - email is already in use zanetine is invalid value for User name field : message - user name is already in use New York + NY + 10001 are valid values
[jQuery] Replace html class with rel attribute into an anchor
I need to replace an attribute inside a tag <a... I have this code html <a href="url.html" class="iframe" >Link</a> And, for all link with iframe class, i need to have <a href="iframe.html" rel="myrel" > Link </a> I have try with $(".iframe").append("rel='highslide-iframe'"); but this append outside the <a... I think this is better: $(".iframe").replaceWith("rel='highslide-iframe'"); but how to set a replace saving the url target? Thank you
[jQuery] jCarousel
I am having problems with the using jCarousel as a text scroller. I have loaded your code but it does not work. Any ideas Yuo can view the site here http://www.activelittleones.com/jcarousel/examples/special_textscroller.html Also do you have a example of the actual code that makes up the RSS feed that you use in this example. I would like to hand craft a simple RSS file. Thanks for your help. Peter
[jQuery] star ratings pllugin
I would like to be able to feed two options into the class name. The following example is from the project page, and works fine. class="star {split:4}" BUt when I try something like class="star {split:4 required:true}" It doesn't work?
[jQuery] Jquery Form Plugin - <form> tags are removed
I am using the Jquery Form pluging version 2.12 to submit a form with a response of another form: <script> $(document).ready(function(){ $("form[@name='formHello']").ajaxForm({ success:function(response){ $("div#formContainer").html(response); } }); }); </script> <form name="formHello" action="form2.shtml" method="post"> <input type="text" value="hello" name="txtHello" /> <input type="submit" value="Send" name="btnSubmit" /> </form> <div id="formContainer"></div> When sent, it should have a response
Replaced Draggable isn't Draggable anymore
Hello everybody, well - I'm stuck. I hope somebody can help me. I have a list of items with draggables in it. Now I replace one of the entries via AJAX and replaceWith. The new line appears, has a new draggable image (same id line the draggable before) and the 'droppable' call as inline js. The inline js seems to be evaluated (tested with a dummy-alert) but the draggable image cannot be dragged. Anybody knows, what I might be doing wrong? or is this an jQuery issue?
[jQuery] UI Magnifier on text links
Hi guys, The UI magnifier plugin works great on images. Is there a way to get it to work on vertical list of text links as well? I've been playing around with it, but to no avail. The plugin modifies the height and position of the link. I guess what I'd want is a way to modify the font-size on hover. I'm learning javascript and jquery as I go along. I'd really appreciate it if anybody could point me in the right direction here. Thanks, Bas
[jQuery] replaceWith returns the replaced element
Hi, replaceWith returns the JQuery element that was just replaced. In the example below: $( 'div#old' ).replaceWith( '<div>new</div>' ).html() It is the html of the old div that is returned. Is there another set of commands to get the new one returned? Thanks, tchvil Here is a working example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/ TR/html4/strict.dtd"> <html> <head> <script type="text/javascript" src="http://jqueryjs.googlecode.com/ files/jquery-1.2.6.pack.js"></script>
[jQuery] IE7 and FF3 difference when hiding elements
I just switched from prototype to jQuery and created my first lines of a simple script with JQuery, however IE7 and FF3 handles the script differently. The script itself is: $(document).ready(function(){ $(".htmlBlock .details").each( function(e){ $(this).hide(); } ); $(".htmlBlock .head a").each( function(e){ $(this).click(function(){ $(this).parent().next(".details").show(); }); } ); }); However in IE7 the element with the class 'details' is not hidden on a quite large page (in kb), however on
[jQuery] jQuery Treeview + CheckBox
It is possible to use a CheckBox in a Treeview? **************************************************** Es posible usar un CheckBox en un Treeview? Don Quijote de Nicaragua. Elder Soto.
[jQuery] Multiple autocomplete
Now, I want to use 2 autocompletes in the same form. What I am doing is i am passing the input textfield filled using autocomplete as an extra parameter while passing the auto compete for the second form. However, I only pass a blank(the default value of parameter1 when it was loaded initially not the one after autocomplete was used to fill it.) while passing this parameter. Any thing that I am doing wrong. Thanx
[jQuery] Simple Reference Question
var Mtemp = $(Mobj)[0] $(Mtemp).append('<div>test</div>') How would I do this on one line? I want to append to only the first element of the wrapped set? Thanks, George
[jQuery] Search for special characters in the autocomplete (no matter whether it is prototype or jquery)
Dear all, We need a solution how to handle special character issue in our application. We integrated a multiple selection id from the autocomplete (as like facebook autocomplete search) library (which developed in prototype). The following is our need, When we enter normal characters (a to z), it should match with the json data (from the preset data only the autocomplete search fetches the result) and display the results. The actual need is, when we enter 'koln' in the textbox field the autocomplete
[jQuery] [validate] Problem with code in ie6 - Object doesn't support method
Hi, Any chance someone could look at the following and give me some clues? http://www.edenvillamedical.co.uk/ The jqQuery Validate function works fine in Safari, Firefox, Opera but throws an error in ie6 (i've not been able to test yet in ie7). Validates the form under the 'Prescriptions' tab. The error is: Line: 30 Char: 1 Error: Object doesn't support this property or method Can't figure this out, any help really appreciated. Regards Matt
[jQuery] Passing Functions in Extraparameters autocomplete
extraParams: { customere: function(){ return $('#customere').val(); }, }, the query takes the the value of parameter "customere" as " function() { return $(' ". Any help regarding the same... Thanx
[jQuery] jcarousel error in IE7
Hi, I use jcarousel but hv problem in ie7. it works on main page but got error in another category. error is Line 1 Char 2 Code 0 Error syntax error URL http://url..../category/ Apprear twice, then another error is Line 36 Char 2 Code 0 Error object expected URL http://url..../category/ When i look at the line, i think something to do with the script jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel({ auto: 2, wrap: 'last', initCallback: mycarousel_initCallback }); I got stuck here.
[jQuery] [treeview] newbie...
What I'm trying to accomplish with the code below is populate nodes dynamically. Thus when a user clicks on a node, I call the function below. The problem is that when the tree is rendered the + and - images to the left of the node does not appear for the new children. Am I doing something wrong in the code below? Thanks in advance for any help. function showNLA(sid) { var children; $.get(setToNewPage("main.aspx")+"?tree=1&sid="+sid, function(data){ children = data;
[jQuery] [treeview] newbie...
I have the following code that retrieves data using an ajax get in the following format: $("#"+sid+"_c").remove(); $("#"+sid).find("a").after("<ul id='"+sid+"_c' />"); var children; $.get(setToNewPage("main.aspx")+"?tree=1&sid="+sid, function(data){ children = data; $("#"+sid+"_c").html(data); });
[jQuery] fadeTo animation repeats multiple times in Firefox...why?
I'm attempting to work with the fadeTo command (also tried other animations like slideDown), but I keep getting repeat animations. Sometimes it'll cycle through 2 times, other times many more times. Here is the code I'm using: $(document).ready(function() { $('.featured').hover(function(){ $(this).find('.banner').fadeTo("slow",.6) }, function(){ $(this).find('.banner').fadeTo("slow",1) }); }); You can view the page live @ www.alexcoleman.net Any help would be greatly appreciated...
[jQuery] jQuery programmer needed
Greetings, I am in need of a jQuery programmer to help me customize some scripts. I would be grateful if somebody would point me in the direction of a group or resource for jQuery freelance programmers Many thanks in advance. Regards, Jason
[jQuery] Can't get upload to work with jquery.form.js
Hi, I'm testing the form plugin and can't get the upload to work. It just submits the page. I really don't know what I'm doing wrong. Here's my code taken from the demo page. <form id="uploadForm" action="upload" method="POST" enctype="multipart/form-data"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> File: <input type="file" name="file" /> Return Type: <select id="uploadResponseType" name="mimetype"> <option value="html">html</option> <option value="json">json</option> <option value="script">script</option>
[jQuery] Position a cluetip x pixels to the right and up based from the LEFT margin of a link!?
I'm trying to get a tooltip positioned right above a hovered link using the plugin cluetip. It wants to base it's position on the right margin of a link, which changes depending on the length of a link so I can't just set a margin to make it position the same all the time. Anybody know how you can make the cluetip position by the left margin of a link, not the changeing right margin..?
[jQuery] minimize loading time
<div dir="ltr">Hi, I am using JQuery $.post and $.each methods, i want minimized version of jquery.js for these two methods its enough for me to load simple pages Is there any idea T.Muthuvijayan </div>
[jQuery] Live Resize
Hi, I'm trying to get an element to have it's css: left property adjusted with the width of the window, but in a live fashion. For example, if you have the following bit of CSS & HTML: body { width: 100%; } #test { width: 300px; margin: 0 auto; } ... <div id="test">Testing</div> Then that div will always position in the center of the browser window. If you try to resize the window, the div adjusts AS YOU'RE RESIZING to remain in the exact center. Now that only works if the div is relatively positioned.
[jQuery] [n00b] merging input values into another input filed value
I am trying to merge vaues from three different input fields into one resulting when submitting a form. I just acn't get my head around. This the last code that does not work for me. function friends() { var friend1 = $(input#friend_1).val(); var friend2 = $(input#friend_2).val(); var friend3 = $(input#friend_3).val(); $("input#rsvp-notes").val(friend1, friend2, friend3); } Any direction much appriciated Stan
The Onclick not working
Am designing a website in that i have the latest news at the top and when users clicks it . am storing it in a recently viewed block , Am calling a javascript function for this process . In the latest am able to click all the titles and i can see the data getting loaded through jquery.min.js but unfortunately in recent am able to click only the first title the data gets loaded for the first onlt but for others it is not and when i click the title nothing is happening and this happens only in IE6/IE7
Next Page