[jQuery] Plugin with API questions.
I'm developing a plugin and I'm having some issues. I put together a small test plugin to demonstrate the problem I'm having. Here's the sample plugin. It simply saves a parameter passed into the plugin into a local variable, and displays that variable at a later time. (function($) { // local variable var parameter = "not set"; // Prototype Methods $.fn.extend({ sample: function(options) { parameter = options.parameter1; return this.each(function() { // processing code here }); }, showParameter:
[jQuery] selected index for <li> item
hi.. i am trying to get selected index for unordered list <ul>. i am using jcarousellite and need to get the index of the currently displayed image. basically i need to display "image x of y" where x is current index and y is total images. i got total images by this var div = $(".anyClass"); ul = $("ul", div); tLi = $("li", ul); tl = tLi.size(); while peeking into the source of jcarousellite.. but can not find how to get the current selected index.... if any one can help.
[jQuery] resolving namespace conflicts
Hello, I'm planning to distribute my website's services to my clients using javascript, much like google map or ShareThis service. Basically my clients will include my external javascript file in their html header. I'd like to write my javascript code based on jQuery, but worrying about all those namespace conflicts. I have no control over what javascript library my clients' websites use, they may use prototype, mootools, they may even already use jQuery. What are the possible solutions to avoid
[jQuery] Element absolute positioning for scolling - kinda - improveverywhere's site??
Hi guys About a year ago I was on http://improveverywhere.com site (i think) and they had a cool feature which I am pretty sure was implemented using jquery. Basically there was a div which contains next and previous which in the layout appears about 150px down the page. The navigation div stayed in line whilst the whilst the user scrolled up and down until the user scrolls past the point where the top of the window hits the top of the div. Normally at this point the div would be lost up the page
ajax return value on success or error with LiveValidation
I am new here, but not new to classic javascript and server-side programming. My server-side Ruby on Rails code returns a 200 OK header if the login name WAS NOT found - meaning that you are OK to use what you typed in. If the login name WAS found, the server returns 500 Error. This part works as confirmed by the console.log(....) entries. What doesn't work is my function check_login() won't return the true or false in the "success" and "error" sections of the ajax call. I know there has got to be
[jQuery] jQuery based Media Player - streaming today!
Happy Halloween folks! I'm happy to announce that a unique jQuery based media player is going to be serving up a stream of the Widespread Panic concert from Voodoo Fest in Nawlins. Entertainment for the masses this evening. If you're around the computer, please stop on by and witness some of this up & coming technology; http://widespreadpanic.com/halloween.php and http://www.iclips.net/widespreadpanic Note that the stream is in QuickTime, so you'll want it installed. I hope to bring this skinnable,
[jQuery] click
I am having an odd behavior when calling click() on a checkbox [2] vs manually checking a checkbox [1]. function checkbox_click(event) { event.stopPropagation(); do_email(enable_email.url); if($(event.target).attr('checked')) { $(event.target).parent().parent().find("td").addClass('selected'); } else { $(event.target).parent().parent().find("td").removeClass(); } } 1. $('#sortable_table tbody :checkbox').click(checkbox_click); 2. $("#sortable_table
[jQuery] [Taconite] Using taconite to append javascript and stylesheets
Hi all, I am using the Taconite (http://malsup.com/jquery/taconite/) plugin to dynamically append external scripts (<script>) and stylesheets (<link>) to the page head section. Inspired by the Taconite example Demo1, I manage to get external scripts working, however stylesheets only seems to work in Firefox, not IE. Here is the Taconite markup I'm using: <taconite> <!-- Works in FF and IE --> <append select="head"> <script type="text/javascript" src="calendar.js"/> </append> <!-- Works in FF but
[jQuery] Howto Question
Hi there, sorry if this is the wrong place to post this, I am fairly new to jQuery and wonder if somebody could help me. On the front page of the JQuery website are three links 1. Lightweight Foot Print 2. CSS3 Compliant 3. Cross-browser When hovering over the links an area fades in (transparent) and when leaving the area the area fades out again. The area seems to contain paragraphs etc. I wonder if somebody knows with which plugin this was achieved, as i want to do sth. similar whereby an area
[jQuery] BlockUI full appending to body instead of form.
I'm displaying a message using the jQuery.blockUI() call. When my message stopped functioning properly, I dug into the DOM a bit and discovered it was moving my msg element to the bottom of the body. Unfortunately this breaks my form. Is there a specific reason the msg is appended to the body instead of the form on full UI blocks? I've changed a couple of lines of code in the blockUI plugin on my machine, but thought it worth mentioning. Is there any chance of that behavior changing in the near future?
[jQuery] Can't change accordion auto height
Hi When accordion is expaned, the height is very large even though there may only be 2 links. How can I customise the 'ul class' that is put in. I have tried taking out 'clearStyle', but that is not working. Thanks
[jQuery] Tooltip creation issue
Hello all, I have created som tooltip code for hyperlinks. I am having an issue with queueing of events. Like when I mouseover multiple links the tooltips queue up and the page goes thru every fadein fadeout. 1. Is there a way to prevent this? Ive tried chaining .stop() to the mouseout event but that doesnt work right. 2. id there a way to put a timer on the tooltip to make sure they hover over the link for say 1 sec before the TT is shown? Thanks! TS
[jQuery] keyboard-based form submission circumvents validator
in short: when I use FF3 and submit a form by hitting the enter-key after typing a few characters in an input field, the validator thinks the form is valid even when it's not, and subsequently submits the form. to see what i mean, go to any jquery.validator demo: http://docs.jquery.com/Plugins/Validation/valid hit TAB until your focused on the single text-input demo form field, type a few characters then immediately hit enter (no tab again; no mouse, etc.). You'll see that the form is submitted even
[jQuery] Validation: AJAX-based without "remote"?
Hi, I need to do some AJAX-based validation to check that the email address entered isn't in the database already, but only if the "I am a new user" radio button has been checked. I know that the Validation plugin has a "remote" rule, and rules that can validate one element based on the value of another. But I couldn't work out how to combine those two, so I tried rolling my own method: $.validator.addMethod("non-duplicate-email-for-new-customer", function() { // If customer is new, check
[jQuery] Format number with pattern
Hi, I need to format a number as specified in a input pattern, Something like this: $("money").format("###.###,##"); $("pi").format("#,#*"); so, money will allow something like 2.500,75 and pi wil allow something like 3.1416 If you know a plugin that could work this way or similar, please let me know. Thanks in advance, IP -- View this message in context: http://www.nabble.com/Format-number-with-pattern-tp20238216s27240p20238216.html Sent from the jQuery General Discussion mailing list archive at
[jQuery] other easing plugins than the standard ones?
Hi, i use .animate() in my cms and would like to try some other easing plugins besides linear and swing, the builtin ones. But i can't find any to download on the jquery site.. Maybe i'm not looking right.. Have you found them?
[jQuery] simple rollover on a tag show or hide div tag in jQuery
I am creating a profile update page using jQuery. The content of the profile is loaded dynamically into a div tag on the page. $(document).ready(function() { // Your code goes here $("div#notifications").load("supportscripts/writeoutprofile.asp"); }); So this loads the profile into the nofifications div tag. This will load a series of div tags which look similar to this: <div class="profileLine"><div class="profileTitle"><a href="#" id="a_ep1">Name</a><div class="editProfile" id="ep1">Edit Profile</
[jQuery] empty() manipulation problem
Hello, I'm trying to use the empty() method to clear a page and print something new. It works fine in Firefox, but has a problem in Safari. Whenever I use the method in Safari, it does what it's supposed to do and then reloads the page immediately on its own. How can I prevent it from doing that?
[jQuery] Call a function that is in another...
Hello, I'm sure this is easier then I'm thinking but ... what I need to do is fire the doSomething(); and or the "$ (window).bind('resize', ...etc" functions out side of the "$ ('[class^=Round_gen]').filter(function() {... etc" ... right now they are inside so I could get them working... but they loop every time.... I want to do them all at once... just not sure how to call them for out side.... thanks for the help... jeremyBass $(document).ready(function() { var SORUCE = '/rounded_rectangle_r.swf';
[jQuery] pdf preview in modal window
Hello, I am looking for a plugin that would allow me to show the contents of a pdf as a modal window. The idea is that the user can preview the contents of a pdf and then click 'download' if they really want to download it, or just exit the window if they don't. Does anyone know if any of the plugins out there could do this? Thanks.
[jQuery] Newbie - is there a better way to do this?
I hope someone can help a newbie out here... I've put some jQuery together to load part of my pages after my page is ready. It works fine, but I'm wondering if there is a better way. In my HTML I've got something like: <div class='progressive' href='my uri path to load something'></div> Then my javascript is like this: function load_progressives() { $(".progressive").each(function(n) { var wrapset = $(".progressive").slice(n) wrapset.load(wrapset.attr('href')) }); } $(function()
[jQuery] li selection problem
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] Is there a way to update an element while you're dragging it?
i'm using the sortables and dragging around div containers with text boxes. I change the value of the text boxes while dragging, but the changed values don't appear on the item you're dragging. Only when you drop the item do the changes appear on the dragged item. Is there a way to refresh the dragged item while dragging?
Parsing xml not working in IE6
Hello, i have this code: xml='<data><a>asd</a></data>'; alert($("a", xml).length); alert($(xml).find('a').size()); which works in FF and Opera (both alerts give 1) but does not work in IE6 (alerts give 0). IE version is 6.0.2900.2180. JQuery version is 1.2.6. Any help? Thanks
[jQuery] ThickBox Bug - Back Button in IE
I’ve had some users that accidentally hit back on their browsers when trying to close the thickbox (instead of hitting the Close Button)... is there a way to make it so the user can click back on their browser and it’ll close the thickbox, instead of the browser going back to the previous page in the history? Or as an alternative, could I disable the back button while a thickbox is open? This only happens in IE, FF closes out the thickbox, but IE is a problem. -- View this message in context: http://www.nabble.com/ThickBox-Bug---Back-Button-in-IE-tp20254220s27240p20254220.html
[jQuery] validate - integrating with wordpress
I'm sorry. Maybe I'm over my head here. But I found a a WordPress site that had the jquery-validate installed and decided to see if I could make it work on my site, but I'm really confused to how to install it. Does it work as a plug-in or do I have to hard code it in the html of the pages. Again, sorry for being so green on this. Sincerely, Henry
[jQuery] Advanced jQuery Animation Problem
This is a fairly advanced jQuery animation I am doing on a site I am doing, but I know it's failing at alert('2'); as you will see it in the comments. I have tried TONS of things and nothing is working, but it's only not working after a user pushes the back button. The entire thing totally tweaks out. I heavily commented it so you know what and why I am doing things. Here is a link to just this part of the sandbox for this. Right now, you will see the splat logo and the info for oscargodson.com no
[jQuery] Determining what element is clicked
I'm working on a project where we have a table and each row is clickable (but only certain columns within that row), but we cannot use an <a> tag for other reasons. Currently I have to attach click events to the proper table cells, which works just fine, it's just inefficient. If I have a table with 50 rows, and 3 cells in each row need click events, that's 150 events attached! We're also doing ajax pagination, so each time we page over that's another 150 events to attach. So my question is, can
[jQuery] Block UI bugs in IE/Safari when used in .ready()
Hi, I want to use Block UI in the (document).ready(...) function. In Mozilla, the page is displayed and the message is appearing and block UI blocks the page, everything is fine. In IE and Safari, the page is only changed when the page has been unblocked (the message is appearing for 1 second though then disappearing). I tried to use a setTimeout, so in IE and Safari the page is displayed, but, I can just see the page is in loading statement until page has been unblocked. Message is appearing for
[jQuery] Script like this site: http://ringvemedia.com/
I visited this site and really like the image resizing... the original pic is big, resizing with bigger resolutions (like 1440x900). BUT the actual script is in moo tools, how create the same effect using jQuery? thanks!
[jQuery] ui.slider with dynamic minimum range
I am trying to implement a slider that can have one or two handles determined dynamically. If there are two handles they have to have a minimum range and if one handle gets close to the other handle, the other handle should move away in order to keep the minimum range. I found the following problems: 1. When I use $('#sliderId').data('slider').options.range = true/ false to dynamically set/unset the range if there are two or one handle respectively, the range = true does get set in the options, but
[jQuery] Is it impossible to popup a PDF print dialog?
Dear all, I know this is not directly related to jQuery but I wish to accomplish this task. My googling suggests that window.print() only prints the currently displayed html page. I wish to print the PDF that is linked to. How do I do that? I think opening an iframe can do it. If possible how to do with jQuery code? Thanks and have a nice day! -Girish
[jQuery] Best site for catching fast with jQuery
Hi! all i'm new bee to this magic(jQuery), can anybody tell from which site to study? which must have lots of examples in it. Thanks in advance shahjahan
[jQuery] Form plugin + Table Drag and Drop plugin
Hi, what I'm trying to do is when a user clicks on submit the form sends all the form variables + the <tr> id's that tDnD generates using ajax. Also when I tried to serialize the table outside the onDrop function it generates an error. I tried many ways to do it but without any success. Ideas are: ************ 1. serialize the table and serialize the form, then submit both variables 2. concatenate both serialized variables and send it to the form Question: ************* 1. I've tried to add parameters
[jQuery] Viewport, Containers and Nested Layout
If you want a Viewport and Containers that allow nested layout, that are jQuery components see the post post, demo and code here. http://santrajan.blogspot.com/2008/10/viewport-column-container-and-nested.html
[jQuery] [validate] Dependent fields - blank selector
I have a feedback form where if the user checks the 'Reply required' checkbox (replyCB) then they must complete either the email field (emailTF) or the phone field (phoneTF). I've searched through a lot of posts and tried some different ways of doing this with the validation plug in but can't get it to work successfully. In fact I'm having difficulty getting the :blank rule to work at all. My validation script is below. Any ideas where I'm going wrong? Thanks in advance. $().ready(function() { //
[jQuery] [tooltip] New wrapper around #tooltip
Hi, How can I add extra content to this line? Current code: helper.parent = $('<div id="' + settings.id + '"><h3></h3><div class="body"></div><div class="url"></div></div>') New code structure: helper.parent = $('<div id="' + settings.id + '"><div id="tooltip_content"><h3></h3><div class="body"></div><div class="url"></div></div></div>') I need this extra div to have more styling possibilities. As I'm using png graphics with shadow I need this extra div to put the background image there to prevent
[jQuery] How to display random content from external .html file?
Hello. I'm relatively new to jQuery, never used JavaScript in my websites before but with jQuery it seems so incredibly easy that I've decided to learn it finally. I mostly use plugins, sometimes slightly modyfing the code etc but getting better every day I think :) Anyway, I have a problem with writing a function that will make this effect possible: I want to display random content from external .html file in my 'main' file. Lets say I have an index.html file with <div id="quotes"> and a texts.html
[jQuery] Problem with events
Hi, I would like to execute instructions after an event has been fired and processed: $('#int').click(); // I fire click event, callback function will be executed // Execute other instructions after the callback fct of the click event has been processed The problem is, how do I know when the callback function has been processed ? Thank you for any tips ! -- View this message in context: http://www.nabble.com/Problem-with-events-tp20238073s27240p20238073.html Sent from the jQuery General Discussion
help: mouse position for navigation
hi everyone, I'm new to jQuery and know a little about it, could someone help how i can achieve this in jQuery. please see image below i want the blue arrow to follow the x-position of the cursor whenever i'm inside of the dark gray box. the blue arrow should only move left and right.
Next Page