[jQuery] How to add a CSS Class to this
I'm new to JQuery. I know you can add a CSS class to an element. But here, it's sort of tricky for this one. $(function(){ updateSettingsForForm1ValidationSet($('#form1').validate({ errorPlacement:function(error,element){ error.appendTo(element.parent("td").next("td")); }, rules:{} })); I figured maybe I could just append an addClass after the element.parent("td").next("td") but not sure if that's correct and then where and how to define the class
[jQuery] Updated API browser
Hi all, Ever since jQuery 1.1.3 the old API browser hasn't been updated due to incompatibilities in the documentation (though that's mostly assumptions). Although the new docs is comprehensive, I've always liked the quick access the old API browser gave. As such, I've got about my own way re-building an API browser based on the new documentation (and assuming the documentation stays in the wiki format, it should be easier to support upgraded documentation). http://remysharp.com/jquery-api/ The API
[jQuery] a mix of "normal" javascript and jquery?
hi again, i have the following code below which in fact works fine. what it does is it limits a small div to be only draggable within another fixed sized div. e.g. you can't drag the div out of the bigger div - it stops at its borders and acts like a "prison". however, to me it looks like a mix of "normal" javascript and jquery syntax. is it, e.g. possible to to with this line: var prison_left = document.getElementById('main').offsetLeft; this: var prison_left = $('main').offsetLeft; at all? i have
[jQuery] returning variable from extension function
I know little about variable scope, have been reading up on OOP, but I don't understand why this would not work. I tried inserting "return objectArray" in various places to no avail... $('#button1').click(function(b){ $().loadXML2array('url','var'); alert(objectArray); // does not work }); jQuery.fn.extend({ loadXML2array: function(url,variable) { return this.each(function() { $.get(url,{xml:variable}, function(data){ objectArray = new Array(); $(data).find('row').each(function(i){ rowObj = new Object();
[jQuery] slider control how
Hello, I am new to both jQuery and YUI. While jQuery has an easy slideUp slideDown mehtods..YUI has an easy slider widget (http:// developer.yahoo.com/yui/examples/slider/slider-simple.html). I am confused which one can achieve the similar feat for me: http://demo.backbase.com/travel/ In that demo if you move the price slider from left to right then the data on the right is shifted accordings. Can someone please give me a pointer on where to begin with this? for starters i dont even want to go back
[jQuery] Taconite + Jframe + forms = weird problem
We are currently designing a very dynamic application, and we thought we could use Jframe, from http://garage.pimentech.net/scripts_doc_jquery_jframe/, to do ajax calls instead of having to write jquery ajax calls code for forms, DIVs, etc, that we constantly remove and add to the DOM. It works excellent with regular links, however, it seems to have a problem with forms. Here's an example: http://72.18.207.149/english/taconite-test.html When you click on the link, the result of the link is displayed
[jQuery] [OT] Looking for testers for a WordPress Plugin
Hello, I just finished up a new release to my WordPress plugin PhotoXhibit (formally Benjamin Sterling Galleries) and I am looking for testers. This plugin relies heavily on jQuery, jQuery UI, jqModal, Easing and other jQuery built plugins and is meant to be a showcase of what jQuery can be used for in real world apps. This WP plugin is basically Album and Gallery controller that uses some of the most popular jQuery "gallery" type plugins such as Thickbox, LightBox, Gallery Viewer, Gallery View II
[jQuery] the Return of "Validation Plugin - hows to only fire on form submit? "
Hi, I find an old post : http://groups.google.com/group/jquery-en/browse_thread/thread/cf34a35e202d9707/4fb5e88f4c81127a?lnk=gst&q=fire+submit# which use this method to show error only on sbumit : var validator = $("form").validate( { onblur: function(){}, onkeyup: function(el) { if(validator.check(el)) $ (el).removeClass(validator.settings.errorClass); else $(el).addClass(validator.settings.errorClass); }, showErrors: function(errors) { alert("should only fire on submit"); } }); Is there a way to
[jQuery] [tooltip] image title rather than anchor?
Hi i use jquery tooltips on anchor links, but i have a system full of images that use the title tag - i have tried everything to switch the javascript but the jquery tooltip is always empty despite it looking wright, just nothing in it? $('#innercontainer a').Tooltip({ <<<<<< WORKS $('#innercontainer img').Tooltip({ <<<< NOPE $('#innercontainer img, a').Tooltip({ <<<<<< just anchor link..... any ideas?
[jQuery] Best way to build flyout menu?
Hi all, What's the best strategy for building a flyout menu? Do we still need to have a larger div (than the flyout) to use for the mouseover 'hide' event? My situation is a series of <li> hold the <a> to show the relevant flyout <div>. I don't know which is the best element to hide the flyout <div> i.e. is it a mouseout on the div? I recall the old way of doing this before jquery used a larger div to detect the 'exit' zone. Regards Sean
[jQuery] [tooltip] image title rather than anchor?
Hi i use jquery tooltips on anchor links, but i have a system full of images that use the title tag - i have tried everything to switch the javascript but the jquery tooltip is always empty despite it looking wright, just nothing in it? $('#innercontainer a').Tooltip({ <<<<<< WORKS $('#innercontainer img').Tooltip({ <<<< NOPE $('#innercontainer img, a').Tooltip({ <<<<<< just anchor link..... any ideas?
[jQuery] Apps that auto-spawn your web profile
Do any of you guys know of any apps that auto-spawn your profile so that you dont have to recreate it everytime you join a new site? It would be nice if there was a standard profile which you can import into multiple sites. I understand this will be a spammers wet dream, but there should also be anti-spam blocking to prevent this. Anyone know of anything out there that does this?
[jQuery] Delete first ten children of a prent div
I have made a calendar, whose HTML looks like this<div> </div><div><div id="calendar"></div><div> <div>data for that day</div></div><div><div> <div>data for that day</div></div> <div><div> <div>data for that day</div></div><div><div> <div>data for that day</div></div><div><div> <div>data for that day</div></div><div><div> <div>data for that day</div></div> <div><div> <div>data for that day</div></div><div><div> <div>data for that day</div></div><div><div> <div>data for
[jQuery] jQEm: font size relative to original?
I'm very happy with this plugin ( http://davecardwell.co.uk/javascript/jquery/plugins/jquery-em/ ) but I can't work out how to establish what the initial (default) em width was. I'm using it to get rid of background images, which will only tolerate 1x size increase (about 20%, I think). If I increase the font size and then decrease it, jQEm restores the default stylesheet. This isn't appropriate if the fonts are still extra-large. Any advice? Cherry
[jQuery] ClueTip Problem!!!
i have used clueTip but facing problem in IE and Opera. In FF its perfect please check http://www.unirazz.com/tooltip.html i am loading some other file on the same folder in the tooltip. FF loads it. IE does not load the external file. Opera asks for user name password. please help me out thnx
[jQuery] determining if table contains rows
After "deleting" a row, I want to test if there are any more rows with the tbody. If not, I want to hide the thead. This logic test returned false: $('tbody', '#documents').html() == ''
[jQuery] Form Ripping
Anybody know why this jQuery code only shows the fieldsets I wrap round it for a fraction of a second before vanishing? Click the Go button several times quickly to see the fieldsets appear. http://styledna.net/jform/ Basically im trying to grab in all form elements then wrap them in a fieldset for each form. Just doesnt seem to work unless I add in an alert(), in which case it works fine...
Multiple elements, same/one ajax call [Solved]
Hi, I am a newbie here who is just learning AJAX/JQuery. I am writing something and am stuck and need help. Imagine this: I have a form with 3 drop down menus each menu has a associated input box. Each menu represents a product. The boxes is to show the price. I have managed to get this working with 1 product now I want to add many products. So say I have 3 rows.. each has a menu (product) and associated box (price). If I choose a product in Row 1, it fetches the price from database and fills it
[jQuery] .getJson() error
I've been receiving error status 'parsererror' while processing json request. How can I resolve this? Snippet: $.ajax({ url: "../filter/filter.json", dataType: 'json', success: function(data) { if (data.error) { alert(data.error); } // do something with XML document with DOM functions alert('1 data'+data); }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log('err status - '+textStatus); console.log('err
[jQuery] Form Ripping
Anybody know why this jQuery code only shows the fieldsets I wrap round it for a fraction of a second before vanishing? Click the Go button several times quickly to see the fieldsets appear. http://styledna.net/jform/ Basically im trying to grab in all form elements then wrap them in a fieldset for each form. Just doesnt seem to work unless I add in an alert(), in which case it works fine...
[jQuery] Select next element ...
I have some troubles with my project. Here it is the problem: I have an HTML like this <a href="">click</a> <div> xxxx </div> <a href="">click</a> <div> xxxx </div> .... When I click on the link i want to change its class and toggle the <div> below without using any ID. I have no problem changing the link, but I can't find a way to select the FIRST next element. $("a").click(function () { $(this).attr({className: "new-class"}); $(this + " + div").eq(0).toggle(); } I though something
[jQuery] simple Jquery Ajax XHR async request for XML and JSON please
I am a former Yahoo! UI user -- I decided to jump ship and start using Jquery after I played around with it last night. I love Jquery! I am looking for some basic examples showing how to do simple XHR's with both XML and JSON datatypes. How do you parse the XML vars using Jquery? I am looking for simple examples that I can learn from. I couldn't find any via Google, FAQ or the documentation. Can someone please link me? thanks and congrats on Jquery!
[jQuery] Defining more than one function
I am trying to define three functions within the $(document).ready() function. However, each of these functions only work if the other two are not there. I have to use noConflict mode because I am also using Protype as well. What is the proper syntax to define more than one function? Here's what I have right now: <script type="text/javascript"> var J = jQuery.noConflict(); J(document).ready(function(){ J('#slickbox').hide('slow'); J("#next").click(function(){
[jQuery] is there a tab-indexer plugin?
or does anyone know how to make one? Something that will incrementally number the tabindexes for all the hrefs on a page? It's a shot in the dark, but worth trying to save all that effort! Cherry :) http://jquery.cherryaustin.com
[jQuery] why are my tabs so jacked up in ie6?
Please use the tabs-powered list on the bottom right side of my homepage: http://www.fourthavenuechurch.dreamhosters.com When the secondary tab is selected, the initial div becomes nested within the newly activated div. What gives? I can't seem to figure it out. I'm using: jquery-1.2.3.pack.js jquery.tabs.pack.js I even tried changing my tabs plugin to idTabs, which did the exact same thing :( Thanks in advance, Brad
[jQuery] Please suggest minimal test of jQuery installation
Please suggest some way to verify jQuery installation. I having some difficulty with jQuery installation on a server with 'antiquated' OS (OpenVMS circa 1995). I not sure if my lack of success is due to the web server software/OS or if I'm doing something wrong. I've managed to install jQuery on several other machines (including much newer OpenVMS). Thanks very much. Ransom Fitch
[jQuery] Form Ripping
Im looking to create a plugin that will rip all form content from any given URL. Obviously AJAX cant handle remote sites so thats done via some server-side proxy, but here is what I have so far: http://styledna.net/jform/ Its working fine, except for when I try processing the content thats loaded. Basically what happens is I read all the content, filter out anything thats not a input, label or text thats a child of a form. That part works fine, but when I try wrapping each form in a fieldset it breaks...
[jQuery] selecting elements in 'load' areas
Hi, I'm having a problem with selectors not affecting things that have been loaded into the page. Any help or ideas would be gratefully received. I'm quite new to all this... See comments in my code below... $(document).ready(function(){ // loads HTML with form and now there are two links with the class of .advancedsearchlink $("#advancedsearchholder").load("load-advancedsearch.html"); // this opens and closes a search area using either of the .advancedsearchlink links - but only the one outside
[jQuery] Star Rating plugin
This is a great plugin but dont work with 1.2.1 version of jquery. Are someone using this plugin? -- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com
[jQuery] I need some help with basic thing
$('a#addsuggest2').click(function() { alert('working'); }); $('a#addsuggest').click(function() { //alert('working'); $('#message').html('<a href="#" id="addsuggest2">add</a>'); }); <a href="addsuggest">Add</a> <div id="#message"></div> what is wrong? When I click on second add link (addsuggest2) nothing happens
Fade between two images
I want to fade from one image to another in my gallery, and I know that the innerfade plugin can do this. I don't really want to preload all of the images on the page, like it seems you have to, because there could be hundreds and they are about 300K each. I'd rather preload only the next image. Currently, the code preloads the next image in the list by creating a new Image object and setting the source. After that, it just switches the image source using image.src = preload.src. Is it possible to
[jQuery] jQuery UI bug (sortable)
when using sortable with options "connectWith", it will have IE z- index bug.
function not working
Hello, I'm new to jquery so I'm sorry if this sounds crazy Basically I created as script, I will show you a part of it for(var i=0;i<data.results.length;i++){ options += '<li><a href="#" id="addsuggest">'+data.results[i].id+' - '+data.results[i].name+'</a></li>'; } $('#suggestlist ul').html(options); <div id="suggestlist"><ul style="list-style-type:none;">here list</ul></div> now when I have a function
[jQuery] tabs: replacing the content without switching the selected tab
Hi, Let's say I have these tabs and code that makes them so ... <script type="text/javascript"> $(function() { var tabSelected = $('#tabcontent > ul').tabs() }); </script> <div id="tabcontent"> <ul> <li><a href="doc_properties.php" title="Document"><span>Document</span></a></li> <li><a href="tabs.php" title="Tabs"><span>Add Tabs</ span></a></li> <li><a href="slip_sheets.php" title="Slip Sheets"><span>Add Slip Sheets</span></a></li> </ul> </div> <input type="button" name="replaceContent" id="replaceContent"
[jQuery] Is this possible with jQuery?
Hi, I have a website with some images.The size of these pictures are ok for the most of users but some of users, who use higher screen resolution, complain about the poor quality picture details. Would it be possible to use jQuery to enlarge pictures depending on users screen resolution? Or what other solution would you suggest? Thank you for your help L.
[jQuery] a question about simple manipulation
hi everybody i want to add some html character to end of all links. i want to add three before each link closing tag </a> my links are like this <a href="http://jquery.com>jquery </a> i want to change it to <a href="http://jquery.com>jquery </a> is it possible to do something like this in jquery ? thanks in advance.
[jQuery] plugin creation question
hi! while working on a plugin and following Mike Alsup's plugin pattern ( http://www.learningjquery.com/2007/10/a-plugin-development-pattern), i'm stuck trying to reference an external function inside the plugin: i have an externally accessible configuration object to store options 's default values. $.fn.jqUploader.defaults = { onIni: initializeUploader(), // more options... }; as you can see, i associate a named function to the onIni property of the defaults object. Here is that function, completely
[jQuery] in IE, cannot copy from draggable modal layer
Hi, we have a draggable form overlay where it is desirable that the user can copy stuff from the modal layer. However in IE7 this is not possible. If I comment out the $('id').Draggable part the text can then be copied. Searching has brought no results, does anyone have a solution or suggestion? -- View this message in context: http://www.nabble.com/in-IE%2C-cannot-copy-from-draggable-modal-layer-tp15412042s27240p15412042.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Help making this code snippet smaller...
Hi, I have this code that animates links when you move the mouse over/out using the hover() but the thing is: the page does not have always the same link colors. For instance, some parts of the webpage has links that have color A and B (a:link and a:hover respectively) some other parts have links of color C and color D (a:link and a:hover respectively) and in the future I might need some other website parts to have even more different colors, currently, I only have these 2. And the code for all that
[jQuery] why would an extension function not return the value?
I posed something similar before, and got some good anwers, so I am trying again because I'm still stuck... $('#button1').click(function(b){ $().loadXML2array('url','var'); alert(objectArray); });
Next Page