[jQuery] .append() variable content rather than text
I am fairly new to jquery and javascript, but giving it a fair try because I am interested in learning it. The trouble I am having revolves around my navigation links. I would like each one to show a specific div in a container I have set up. The HTML loads with all of the divs visible, which I then store each one with a project variable. So, the problem happens when you click on a navMenu link... The div fades out as supposed to, but instead of it being filled with a replacement div stored from
[jQuery] linkSelect - the width of the options container
Hi, 1st of all thanx and kudos to the creators of mighty LinkSelect plugin! I stumbled upon the situation, which seems confusing to me. In my app, I noticed that the LinkSelect used to create the container for its option list which is too wide. I read the docs and found the option "fixedWidth". To my bewilderment, it didn't work. I fired the Venkman and analyzed, what's going on... So, the following piece of code takes care of the container width (lines 532-537): // get the width of the anchor link
[jQuery] Selecting option of select with different ID using same code
Please take a look on example code: <script type="text/javascript"> jQuery(document).ready(function() { jQuery("#imageShowcase img").hide(); jQuery("#productImgDefault").show(); jQuery("#colorSelector").change(function() { // Hide all images on slect element change action jQuery("#imageShowcase img").hide(); // Get the value of selected option var optionValue = jQuery(this).attr('value'); // Just a test to see if you're getting option value // alert(optionValue); // Get the content (aka inner HTML)
[jQuery] Unbinding Event Handler
I am unable to unbind an inline onchange event hander for a check box with jquery. - please note this is only on FireFox. <code> <script type="text/javascript"> $(function() { $("checker").unbind(); }); </script> </code> <code> <form> <input type="checkbox" id"checker" onchange="document.getElementById('tester').style.background='#FFFF99';" /> </form> </code> Using different methords to reference check box does not work either. I have learnt a lot trying to figure this out but after about 20 hours
[jQuery] $.fn.data() is significantly slowed down by $.fn.trigger().
$.fn.data() internally uses $.fn.trigger() for whatever reason. When using $.fn.data() heavily, $.fn.trigger() starts to slow down the code. In my situation Firebug profiler tells me 20% of the time is consumed by $.fn.trigger() as a result of $.fn.data() calls. Shouldn't it be possible to get rid of $.fn.trigger() in $.fn.data() or make $.fn.trigger() more efficient?
[jQuery] Want a demo of sliding Text..please help
Hi Friends.. A very Good Morning....I am new to this group .i found this while searching... I want a Demo script of sliding Text . Please help If u have any idea of this. Thanks -Ani-
[jQuery] Grading a list (1-10)
Hi, I have a list of 10 items and I wish the user to be able to grade each one from 1-10. I need to make sure not more than one item has a particular grade i.e once the 'rating 5' has been used up it can't be used again unless the item that currently has it is changed. I have been using 10 combi boxes with 10 options each. After grading the user clicks a button and their list is displayed. My code is a mess so before any example does anyone know if this ios the best way to go about this? Thank uyou
[jQuery] callback after insertBefore or insertAfter is complete;
Hello. I need to call function after $("#element).insertBefore("<a href=#' title='prev'>prev</a>"). I was trying $("#element).insertBefore("<a href=#' title='prev'>prev</ a>", callback_function); but it didn't work. What can I do to achieve this? Thank you.
[jQuery] Configurable jQuery Components
If you are interested in creating jQuery components using config options have a look at my post here. http://santrajan.blogspot.com/2008/10/configurable-jquery-components.html
adding ., removing class with overflow:auto
I've got a div that on load has a class applid which has the attribute overflow:auto.so the dive is about 100px height with the sroll bar with the content exceeds the height. Now when I click on a button i'm wanting the whole table to expand, so what i've done is used Jquery to remove the class like so: $("div.testHolder").removeClass("tableCollapse"); the problem i'm having is that in IE6 its locking up the browser when I click the button. any ideas what this could be or of a working alternative
$ is not defined [SOLVED]
hello - newbie to jQuery here. I downloaded the latest version of jQuery and have tried to run the Hello, jQuery example found at: http://docs.jquery.com/Tutorials:Gettin ... ith_jQuery i am running on iis 5 on a windows machine (XP). I am testing the code in FF3 and IE7. i am getting the following error: $ is not defined i am puzzled as this is a very straightforward example i am trying to run. if anyone can give any advice, i would appreciate it. UPDATE 10/30/08 - for those who run into the same
[jQuery] Dialog box that auto expands depending on content
I have a form that I pull into a dialog box. I've set the dialog to have an "auto" height as an option and it sets the height when the form is pulled in. However I'm also using the validate plugin which when displaying an error message adds additional height the the form. However the dialog doesn't expand with this additional content. Does anyone know how I can make it do this? You can see a test of the dialog on this link: http://common.leeds-art.ac.uk/validate/openday_bookings/test.php Leave all
[jQuery] jCarousel and proportional scaling help needed
Hello; I wish to make a small-ish photo gallery, combining jCarousel ( http://sorgalla.com/jcarousel/ ) and Galleria ( http://devkick.com/lab/galleria/ ). The issues for me are that - my images aren't square (in fact they are mixed horizontal and vertical), - I'm not using Flickr or some other CMS that generates square thumbnails and - I don't wish to have to create and manage a separate thumbnail for each image. I love nearly everything about Galleria. It is (for me) a huge benefit that Galleria
[jQuery] focus element after some effect
Hi, Im using slidetoggle effecto to show/hide some form (form1), and hide/ show other form (form2). So when form1 is hiding, form2 is showing. Now Im trying to focus some input when the effect has finished, for example form1.myInput, but im not able... When I try to do it in a callback, it focus, but the form is not visible after the toggle. I think the problem is that callbak is called while running the effect. Is there any way to call a function after the effect has finished, and not during the
[jQuery] [validate] Problem with validation on a form pulling in with Ajax
I have a script that generates a form. I'm pulling this form into a dialog box on my main index page via Ajax and trying to attached the Validate plugin to the form. So I've got this: $("a.attendee_add").click(function() { //Get href from link var addURL = $(this).attr("href"); //Ajax get from href link $.get(addURL, function(data){ //Display content in dialog box $(data).dialog({ height: "auto", width: "auto", resizable: false,
sliding menu only called once
Hi there, on a Drupal website I'm trying to get a Sliding Menu using Jquery running. Here is the code: $(document).ready(function(){ $("#block-menu-primary-links ul li ul ").hide("0"); $("#block-menu-primary-links ul li ul ").css("display","inline"); $("#block-menu-primary-links ul > li") .mouseover(function () { $("#block-menu-primary-links ul li ul ").fadeIn("slow") }); }); This only works for the first time an entry is hovered. If I hover over the second entry it does
[jQuery] Validate Plugin - Multiple Requirements? [validate]
I'm doing something similar to this example: http://docs.jquery.com/Plugins/Validation/Methods/required#dependency-callback I have a date input field, and if you are under 13, it pops up another field for parent's age.But unlike this example,I want the parent to be required to be 18 or older.How would I set it up to require the input, and require it to be over a certain age. It 's also important to note that the inputs are dates, not ages, so I can't just do "min:18" because it 's more like "Tue
[jQuery] Plugin code needs comments and optimization
Hey everyone, I have a small plugin that I wrote that makes a normal form into an ajax form. I also want the user to be able to pass some ID's to the plugin so that they can return specific content in the server response and place it on the page. But, if the user chooses to leave that blank they should be able to, this where my problem is. Right now, I have html for the findTarget, and it seems to work ok, since both are not filled in, but I am not sure if this is the most efficient way to do this.
[jQuery] [hacking] animating a div with fuzzy png borders
hi. i want to animate a div element that is styled as a jquery dialog. During the animation i need to adjust various widths and heights of the border and background child-divs.. So i got a function to do that, and it works. I can call it after the animation has completed, but not during. How would i hack that into the source of 1.2.6? Here's the animate function, with my addition of inFlightCallback: As it is now, it doesn't get called :( animate: function( prop, speed, easing, callback, inFlightCallback
Yikes Stripes!
I'm a newbee. I want to create a collapsable ul. But I want each visible li (including both parent li and child li's ) to alternate the background color. The problem is that when I apply the background to the parent, all of the child li's do not change color they inherit the parent color. I am using the following code to make this happen... <html> <head> <script type="text/javascript" src="jquery-1.2.6.js"></script> <script type="text/javascript"> $(document).ready( function() { $('li.stripeable:even').addClass('greenbar');
[jQuery] sortable links
Using the jquery UI plugin, I have setup a list of links (anchors) to be sortable, but after I sort an item, the link is executed, and I am taken to the web page for that link. Is there a way to setup the Sortable plugin to prevent this from happening?
[jQuery] Internal Links Broken
Hi everyone, I'm having a very strange problem and I'm hoping someone can help me. On our website, we have a page that lists events. On that page, there are links to scroll down and view the details of each event. The problem is: When you click the internal link, all content above the anchor is cut off! I've disabled the links to the public for now, but I'll give you guys the link for example sake: http://www.mesa.ca/events#1 http://www.mesa.ca/events#2 http://www.mesa.ca/events#3 http://www.mesa.ca/events#6
[solved]passing custom attribute 'jqimg' from one plugin...
this seems like it should be easy. I have a page on my site set up as a portfolio with the http://devkick.com/lab/galleria/Galleria plugin (http://www.kennethrapp.net/graphicdesign/portfolio-jquery.php). Galleria, as it's set up with its option for custom thumbnails, uses an unordered list with a link to a thumbnail image around a large image. Something like: <LI><a href="(link to thumbnail src)"><img src="(large image)"></a></LI> I want to extend the functionality of this with the http://www.mind-projects.it/blog/jqzoom_v10jqzoom
[jQuery] Drag and Drop Question
im trying to write a cork board type app for a site and im having a little trouble with the drag and drop. basically there are 2 divs (#picker, #board) that load on the page. the #picker div contains various images that the user can drag and drop onto the #board div. once an image has been dropped into the #board div i want to change it to a draggable element so the user can arrange all the image how they please. i can get all of that to work. however, using firebug to see whats happening, once i
[jQuery] How do I keep from focusing a readonly field?
Hi all, I have a table that I will usually want to focus the first input box in the first column in the last row. Something like this: <table> <tbody> <tr> ... </tr> <tr> <td> <input> <-- selects this one <input type="hidden"> </td> <td> <input> </td> </tr> </tbody> </table> And I use this to do that part: $('tbody>tr:last-child>td:first- child>input').focus().select(); The problem is, in some cases, that input field is readonly, so I don't want to select it. I want to select the input in the next
[jQuery] testing - please ignore
asdsad
[jQuery] Quick Syntax Error Check
IE7 is telling me the following script has a syntax error and I have tried to find it but haven't located it . . . yet: (function($){ $().ready(function() { // validate the comment form when it is submitted $("#commentForm").validate(); // validate signup form on keyup and submit $("#signupForm").validate({ rules: { email: { required: true, email: true }, }, messages:
[jQuery] SuperFish with supersubs problem
Hello, I have used superfish & supersubs on that website http://www.atut.lublin.pl/ it works great in ie, however it's got problems in firefox 3. When i first enter the site (empty cache) measuring does not work well and submenu MIERZONE GAZY is much too wide. When I enter a different page (cache primed) everything is ok. I tried debugging with firebug or displaying alerts, however when i do that it works fine everytime. Anyone have an idea what is wrong ?
[jQuery] parserError using load()
i am using the following code to load dynamic content into a div (mainContentArea) on my webpage. I occasionally get a parserError when loading the content into dom. but sometimes not. what is causing the parserError and how can I fix this? this is my jquery code: $('#mainContentArea').load('content.cfm');
[jQuery] slideDown with append
I'm sure this one is super simple for a bunch of people, but I'm a bit stuck. I have a list of items (show listings) and when a user clicks on a show, I want a map to slideDown and display a map of the location of the show. If the user clicks on another show, the map that is being shown slides in, and the new one slideDown. Very similar to an accordian, but my initial markup isn't as simple. What I thought I could do was to just append the show listing with the html to hold the map, and then call
[jQuery] text after a radio button
Working with Lotus Notes developer - apparently, when building a form with radio buttons elements, Lotus automatically puts the value in text beside the button. He says there is no way to override this. So we get: <input name="joe" type="radio" value="1" />1 <input name="joe" type="radio" value="2" />2 <input name="joe" type="radio" value="3" />3 <input name="joe" type="radio" value="4" />4 <input name="joe" type="radio" value="5" />5 I said maybe we can hide that text with jQuery, but I find that
[jQuery] Binding multiple custom namespaced events not working correctly
Hello, Run the following code snippet in Firefox and open up Firebug. It fires a custom event upon left or right click. The handlers for 'myclick.left' and 'myclick.right' work as expected. The problem is that 'any click' is only logged to the console in case of a right click, and not in case of a left click. That doesn't make sense to me. Is this a bug or am I missing something?? $(). bind('myclick.left', function() { console.log('left click'); }). bind('myclick.right',
[jQuery] Jquery and AJAX
I have a form with updatePanel. I ahve Jquery inimplemented on this form. Everything works fine, but when a asynchronous postback takes place when I clickc the button inside the updatePanle, all Jquery features goes away. I googled for this and found that, I need to write the Jquery code in PageLoad, can anyone give me a sample code example for this...?? Also How to check in jquery , if a perticular radiobutton is checked/ selected...??? Thanks in advance....
[jQuery] .load not always working
i have a sidebar menu where users can click to load new data into the main part of the screen. it works most of the time but after a few clicks in the menu, the whole page just freezes and the loader stops working. it doesnt load any more data. its not specific to any page or link. it just stops after a few clicks. this is my jquery code: <script type="text/javascript"> $(function(){ //load profile main as default $('#mainContentArea').load('profile.cfm?id=123&type=main'); //onClick
[jQuery] .load not always working
i have a sidebar menu where users can click to load new data into the main part of the screen. it works most of the time but after a few clicks in the menu, the whole page just freezes and the loader stops working. it doesnt load any more data. its not specific to any page or link. it just stops after a few clicks. this is my jquery code: <script type="text/javascript"> $(function(){ //load profile main as default $('#mainContentArea').load('profile.cfm?id=123&type=main'); //onClick
[jQuery] jQuery Documentation in PDF
Hi: I made a program for create a PDF of the jQuery and jQueryUI from the xml. There's also the source code of the program (made in VS2005/C#). I hope someone find the docs in PDF usefull as me :) You can download from: Docs in pdf: http://www.puntoequis.com.ar/aktive/soft/jQueryDocumentation.7z Program to create: http://www.puntoequis.com.ar/aktive/soft/jQueryDocs-Creator.7z I will post updates in my page (in spanish) http://www.puntoequis.com.ar/npx/default.aspx?VIEWENTRY050057 Jonatan
How to get absolute x,y position of element?
Hi, How do I get the absolute x,y position of a element on the page (cross browser safe)? Thanks, Philip
[jQuery] Deployment concerns for jquery
I see a lot of demos for jquery and normally how I do it is I just do a right click and copy the source of the demo right on to my web application. This has however lead to a messy javascript library because I have my pieces of the same code lying around the place. Could someone with experience share with me the proper way to do this on a production site? Thanks.
[jQuery] Is array empty?
Hello, I have the folllowing: var levels = []; $levels = $('input[name="Levels"]:checked + label'); levels = $levels.map(function() { return $ (this).text(); }).get(); How can I check if levels array is empty? I tried levels, levels.val(), etc but I was not able to make this work. Thanks, Miguel
[jQuery] binding solution
I am having a binding issue. I've read enough in the jQuery docs and on this forum to have a cursory understanding. Without many examples to refer to, I am unsure of how to implement Live Query in order fix. I'm calling this refreshLabels() function each time a form checkbox is clicked. On the first click, alert() and replaceWith() act as desired, but on subsequent clicks, only alert(). function refreshLabels(element, slug) { $.ajax({ url:'/labels/sidebar/' + element + '/' + slug + '/1', cache:false,
Next Page