[jQuery] Accessing initialized plugin options from public method (?)
How do I access options that have already been initialized from a public method? example: jquery.plugin.js: (function($j) { $j.fn.plugin = function(options) { // build main options before element iteration var opts = $j.extend({}, $j.fn.overviewSummary.defaults, options); alert(opts.test); }; $j.fn.plugin.publicFunction = function(options) { //how do i read the previously initialized options without having to pass them twice? alert(opts.test); }; ..................... // from another file i call
[jQuery] Superfish - Still Need Help - Vertical Menu
In IE 8 & FF 3.0.6, my vertical sub-menus are only displaying a partial link. I've tried a couple suggestions and played with some of the z-indexes but can't find the fix. They display fine in IE7. Any help would be greatly appreciated!
[jQuery] jQuery Keyfilter Plugin
I glad to present jQuery Keyfilter Plugin. This plugin filters keyboard input by specified regular expression. * <a href="http://jquery-keyfilter.googlecode.com/svn/trunk/ demo.html/">Try out a demonstration</a>. * <a href="http://code.google.com/p/jquery-keyfilter/downloads/ list">Download</a>. This plugin also already uploaded to http://plugin.jquery.com/ I recommend to use it with <a href="http://bassistance.de/jquery- plugins/jquery-plugin-validation/">jQuery Validate</a> plugin to provide robust
Animating two selectors at the same time.
I have a slide out menu that when it slides out I want the logo to fadeOut as well. I can get both to happen but when the logo fades the slide out menu button goes away as well the menu. I tried seperating the functions but then one works and the other doesn't. This is the closest I've gotten. Here is the code: var menu = $(this).find('.slide_menu'); /* the menu that slides out. var menuSlide = $(this).find('.cp_slide'); /* the link that is clicked to make the menu slide out and the logo fade out.
[jQuery] Stop effect
Hi, how can I stop this effect? $('#y').fadeOut('slow').animate({opacity: 1.0}, 3000).fadeIn('slow'); I've tried independently $('#y').stop(); $('#y').stop(true); $('#y').stop(true,true); without any result thanks
[jQuery] Help with checkbox events.
Hello Guys! I've got a script here which I'm looking for your help in bettering. At the moment the script gives me a 'select all' checkbox which when checked ticks a bunch of other checkboxes, also I have another function which enabled/disables an input button provided that 1 or more of the checkboxes are checked. $("input[name=select_all_campaigns]").click(function() { var checked_status = this.checked; $("input[name=Campaign_IDs]").each(function() { this.checked = checked_status; }); }); $("input[name='Campaign_IDs']").click(function()
jquery date picker
I need some date in date picker to be blocked or non clickable . For eg jan 1st and 23 feb 27 and 28 .... Dec 15 and 21 The above mentioned date needs to be blocked similar like blocking the week ends. Help me pls....
[jQuery] how to search/replace text nodes?
I want to iterate over all text content in my document in order to replace certain text with other. It isn't safe for me to just work with the $().html() if the entire document because I might accidentally match and replace some of the non-textual content, eg values of attributes. I've been unable to use the obvious approach of filtering on nodeType=3 in order to get just the text nodes. I am not sure if it is related to this reported issue: http://www.nabble.com/Bug:-1.3_b1-selector--nodeType%3D3--not-working-td21286366s27240.html
[jQuery] [validate] Validation with example plugin
Hi, I'm using the validation plugin which is really cool but I'm also using it along side the example plugin (http://mucur.name/system/ jquery_example/). My form validates fine for fields that don't have any example text but the validation won't trigger for fields using the example plugin. This is the code: $("form").validate({ meta: "validate", errorLabelContainer: "#errors", wrapper: "li" }); // Add example text to textboxes $('.textWaterMark').each( function() { var element = this; $(this).example($(this).attr("example"));
[jQuery] Help with Multiple File uploading
Hello, I am desperately trying to implement the Multiple File Upload Plugin into a script. However, I seem to be having no end of problems simply getting it to pass the files through. I have set up a simple two-page script. The front-end is simply a form with the jQuery plugin, and the receiving script all I try to do is print_r the files array, yet it is empty. Nothing is being passed. Any ideas on why this is the case? If it works, this is the code I use on the form page (yes I do have the jQuery
The <a> tag won't work after cloning
I tried to make use of the clone() command while duplicating a <li> but for some reason I can't get the links to work on the cloned copy. Could you check this out and tell me what I did wrong? /* ---- Sample markup ---------------------------------------------- <ul> <li><input name="" type="text" /><a href="#" class="add">+ add more</a></li> </ul> */ //JS starts here $(document).ready(function(){ $('a.add').click(function(){ $(this).parent().clone().insertAfter($(this).parent()); });
[jQuery] Picasa & getJSON not working properly
I'm trying to pull my Picasa album JSON feed into my website, but I'm having problems. It is pulling in the Picasa thumbnails without a problem, but when I try to pull in the full sized photos (<200kb), it returns nothing, even though I have verified that the links are valid. Below is the code that I'm using on this skeleton webpage - http://derekperkins.com/seatability/wp-content/themes/Seatability/test.html. Why would the thumbnails work but not the full content? $j = jQuery.noConflict(); $j(document).ready(function(){
[jQuery] .css('line-height', 'auto') doesnt work
$('.div > p').css('line-height', '25px'); works but $('.div > p').css ('line-height', 'auto'); doesnt. Is there anyway to set to auto ?
[jQuery] How to surround All content after a specified HTML attribute H2?
I am trying to look through content in a div and if i find an H2 or whatever attribute the content or HTML that follows it will be encloded in a div with a class. I will do this for every H2 so if i have 3 H2's and some paragraphs after them it will surround all HTML after each of the H2 in a div. So my HTML would look like this... <h2>some dummy text</h2> Some Content <h2>some dummy text</h2> Some Content <h2>some dummy text</h2> Some Content And i want it to do this... <h2>some dummy text</h2>
[jQuery] how insert (prev) id into .before statement?
Hi, I have a field <input id=123 type=text> and want to get <input type=hidden value=myid><input id=myid type=text> so I can't realize how to get id and add it to "before" statement. something like $("input:text").before("<input type=hidden value= >") ??
Cleartype text rendering strangely
Hi there, I've written the following code for a kind-of accordion: jquery jQuery(document).ready(function(){ $(".question").click(function() { $(this).next().toggle("medium"); }).next().hide(); $(".expand_all").click(function() { $(".question").next().show("medium"); }); $(".collapse_all").click(function() { $(".question").next().hide("medium"); }); }); html <p><span class="expand_all"><a href="#">expand all</a></span> | <span class="collapse_all"><a href="#">collapse
[jQuery] testing
sorry for the test guys!!
[jQuery] Superfish - sfHover question
We have superfish working well with image replacement for the top level menu items. We use different images for each item based on normal, active, hover. The active states and normal states are working properly. The only problem is with ie6 since it seems to not support li:hover and we are replacing the images on the li. I noticed using firebug that when a top level menu item is hover over superfish adds the class sfHover to the li but it only does this on the li of the current (active) menu item
[jQuery] Striping Sometimes Doesn't Work
The following code snippet: $('OL.codeSample LI:even').addClass('even'); is working on one of my sites to zebra striping to list items but is not working on another one even though both have jQuery 1.2.6 in place. The site where it's not working is here: http://developer.cmzmedia.com/?p=115 Any ideas?
Mouseover on GrivView
Hi All - I am new to this forum and also to jquery. My application is ASP.Net 3.5 sp1 - VB.Net and uses Master Pages and AJAX. After working out all the issues with Masterpages and AJAX and getting jquery to work - I have run into an issue that I can not resolve. I am using one of the beginning examples to highlight a row in a GridView on mouseover. It works great - the problem is that it works on the html tag <tr>. The page where the GridView is also has a Calendar Control which also renders <tr>,
[jQuery] Counting Lists inside of Lists
So I have a main list of states in an unordered list and then a unordered list of cities within each of those. So I wanted to count the number of cities per state. <ul class="state_list"> <li> <h2>Alabama</h2> <ul> <li><a href="http://www.google.com">Alabama State</a></li> <li><a href="http://www.google.com">Alabama State</a></li> <li><a href="http://www.google.com">Alabama State</a></li> <li><a href="http://www.google.com">Alabama State</a></li> </ul> </li> </ul> $('.state_list > li').each(function(i){
[jQuery] iterate through form elements, wait for post to finish and continue
I have the following inputs <input type="text" id="start_date" value="2009-01-01" /><br/> <input type="text" name="a" id="a" value="3 days" class="interval" rel="a_preview"/><span id="a_preview"></span><br /> <input type="text" name="b" id="b" value="3 days" class="interval" rel="b_preview"/><span id="b_preview"></span><br /> <input type="text" name="c" id="c" value="3 days" class="interval" rel="c_preview"/><span id="c_preview"></span><br /> <input type="button" id="assign" name="assign" /> The
[jQuery] Finding values (text,numbers, regexps) in objects (arrays or key/value pairs)
I know that this is not the place to post my question but here it is. If someone knows a better place please do inform. I have an array of objects and I want to retrieve specific elements that match certain criteria, i.e. find value A in an object B. The problem is that I cannot know what is A (text, object, reg exp, array) and what is B (text, object, array). Also, I must assume that B may be an array or a key/value object and that A may be anywhere (including 'children' objects). This is usually
mouseout/mouseover simple tooltip flashing problem
I have written a really simple tooltip style rollover that tracks the mouse position and on mouseover displays a span. This is all working great the problem is when the user moves the mouse the browser processes the movement of the span slightly slower than the mouse causing a mouseout when the mouse moves over the displayed span tag. This results in the span to fadein/fadeout a few times (flash) I have reduced this by adding a 5x 5y space but if the user moves the mouse with a bit of speed it catches
[jQuery] Form Plugin Issue in IE (resolved, sort of)
I'm new to the discussion board, and I posted a message about 20 minutes ago. I haven't seen it come up yet on the board, so I'm not sure if I mis-submitted or there is a delay. Apologies in advance if that one comes up, too. I've worked with the Form Plugin quite a bit and really like it. A couple of times, though, I did notice that it appeared to not be submitting properly in IE. Today, we experienced the same issue. Details: - Latest version of Form Plugin (2.21) - HTML of form validates - Only
[jQuery] Checkbox checked attribute no set when trigger using click()
Hi, I'm rewriting some old code to use jQuery now, and I can figure out why this isn't working and would love some help. I used to create a checkbox DOM element and assign a function object to the onlick handler: var theElement = document.createElement( 'input' ); theElement.type = "checkbox"; theElement.onclick = checkCallback; Then later I want to invoke that handler if some state is true, put that in using jQuery a while ago: $(theRow).find(':input[type="checkbox"]').click(); When I did this the
[jQuery] [validate] submitHandler prevents cancel value from being included in POST
I have a simple form with submit and cancel buttons. Standalone everything works great. With the basic validator added, it also works great, cancel is recognized and validation is skipped. When the submitHandler is added validation works, but all the data EXCEPT for the cancel (_cancel=Cancel) is POSTed. This is the case whether I use either "form.submit()" or the ajaxSubmit. I am using jQuery 1.3.1 and validation 1.5.1. (Form library is the version bundled with validation 1.5.1) ----------------------
[jQuery] JQUERY Client Side Date Validation
All I would like to do is write a simple validation routine to ensure the date entered by the user is less then the current date. Below is some puesdo code of what would be nice if it worked. But it doesn't . . . . $.validator.addMethod("ValidDate", function(value, element) { var currentdate = new Date() var userdate = new Date(value) if (userdate.getTime() <= currentdate.getTime()) return true; } return false; }, "Invalid Date."); Any suggestions would be greatly appreciated! Thanks in advance for
[jQuery] Anchor HREF update and delayed navigation
Hi, I am using getJSON() to retrieve some data I want appended to a clicked anchor's href before it navigates. I first tried binding the update function to the anchor's click-event, but while the callback is pending the browser navigates to the original href. I then tried both unbind() and one() in combination with click(); basically, I override the click-event completely with a preventDefault(), and then call the element's click() in the callback. The following example simulates the callback-delay,
[jQuery] Client Side Date Validations Using Query
What I'm trying to do seems like it should be really simple but roadblocks keep coming up so any help would be appreciated. Basically what I want to do is a check to ensure the date the user entered is less then the current date. Below is some mock code of how it should work. $.validator.addMethod("ValidDate", function(value, element) { var currentdate = new Date() var userdate = new Date(Value) if (userdate < currentdate ) { return true; } return false; }, "Invalid Date."); This also have various
[jQuery] the jquery form plugin and the accents !
I have a problem with the jquery form plugin. I submit a form (to test.php) in which there are text fields and one file field + enctype='multipart/form-data'. The html page has a meta which defines the charset to iso 8859-1 The test.php module begin with header('content-type:text/ html;charset=iso-8859-1'); I read the text fields like this: $nom = htmlspecialchars(addslashes ($_POST['nom'])); I read the upload file like this: $tmp_name = $_FILES['photo'] ['tmp_name']; Here is the problem: If my text
[jQuery] Superfish Joomla drop down issue
I successfully installed Superfish on Joomla and edited the CSS to replace the top tier menu links with images, however now the drop downs appear with not only the correct textured background (applied to the ul) but also the top tier image repeated on top. Anyone know how I can fix this? http://projects.thatsus.com/angelinascms/
[jQuery] Synchronous jQuery.getScript call failing randomly in Firefox 3
I seem to have run into a rather odd issue someone might have encountered. Any suggestions would be appreciated. I created a script used to load jQuery plugins. The meat and potatoes are as follows: $.ajaxSetup({async: false}); for(var i in list){ var plugin = path + "jquery." + list[i] + ".js"; $.getScript(plugin); } $.ajaxSetup({async: true}); This works like a charm most of the time in all browsers, calling each script and waiting for it to fully load. When calling this in the head of a page,
[jQuery] [tooltip] Is there a way to make tooltip recognize modified title attributes?
I am trying to change the tooltip message based on user interaction, but it doesn't look like the jquery tooltip plugin recognizes modified titles. It seems like tooltip caches whatever is on the page during the initial pageload, and I can't figure out how to refresh the information. If I change a title after pageload, I have a weird effect where the jquery tooltip displays the previous message, but the browser also displays the updated title attribute in it's native title display. Keep in mind I
[jQuery] A question for John Resig
This might be a stupid question, but I have to ask ... What is the reason for not having functions like isString, isNumber, isBoolean, etc? Is it just because that would create extra function calls?
[jQuery] How to debug when upgrading Jquery...
I have a number of plugins that aren't working when I upgraded the site from 1.2.3 to 1.3+. I am assuming this is based partially on the plugin although updated them to the latest as well...How can I begin to troubleshoot these changes? I am thinking it could be something with the selectors - core - I dont even know how to troubleshoot it doesn't throw errors - just doesn't seem to be binding to the elements. I know this is vague - I am just looking for somewhere to begin. I want to update the site
[jQuery] Access remote page using jQuery.ajax
According to the API documentation of jQuery, the jQuery.ajax function is supposed to: "Load a remote page using an HTTP request." I've tried running a function with jQuery.ajax: var xmlDocument = 'dev.xml'; $.ajax({ type: "POST", url: "http://example.com:80/xmlservlet", processData: false, data: xmlDocument, success: function(msg){ alert( "Data Saved: "); } and I keep getting an error "Access to restricted URI denied" code: "1012" when
[jQuery] Validation problem with versions 1.3 and 1.3.1
Hi, Trying to upgrade from Version 1.2.6 to 1.3/1.3.1, but my validation stopped working. Here's my working code: <script src="jQuery/jquery-1.2.6.js" type=text/javascript></script> <script type="text/javascript" src="jQuery/jquery.validate.js"></ script> <script src="jQuery/jquery.dump.js" type=text/javascript></script> <script> $(document).ready(function() { $("#healthbeat").validate( { messages: { issuemonth: "Please enter an Issue Month", issueyear: "Please enter an Issue Year", quote: "Please
[jQuery] Time select/text boxes like Google Calendar
Does anyone know how to mimic the Google Calendar time select/text input using jQuery? I have autocomplete working on a different field in my form and thought that it may work for hour and minute selection on a text input, but I cannot get the values to show up unless the user clears the field entirely, which is not that intuitive. What I really want is for the available options to pop-up when the user focuses on the field regardless of whether their is a value in the field already or not. Then,
[jQuery] Bad Syntax? $('body').append('<input value="' + multipliedweight + '">'); breaks script
A test page is located <a href="http://www.procycle.us/ test.html">here</a>. I'm attempting to insert an extra hidden input field with the extra weight whenever an item in our shopping cart page has a quantity of 2 or more. Problem is this specific part of the code: $('body').append('<input type="hidden" name="weight" value="' + multipliedweight + '">'); causes an externally linked array named domesticpriorityarray to become undefined according to firebug. If I remove the problem code: $('body').append('<input
Next Page