[jQuery] Opening a popup question
Hi, a list of database items, each item has a picture which I want to open onclick as popup. <a href="javascript:void(0);" class="product_popup" name="id_123"> <img src="/img/uploads/article_123.jpg" width="100" id="bigimage_id_123" name="width=400,height=200" border="0" /> </a> my jquery: $(document).ready(function(){ $("a.product_popup").click(function(){ $(this).click(function(){ var ver_id = $("a.product_popup").attr("name"); var img_name = $('#bigimage_id_'.her_id).attr("src");
[jQuery] something wrong with $.each()
Sorry, cannot find solution, why this code don't modified variable 'doc' var doc = '<div><span>test</span></div>'; $('span', doc).each(function() { $(this).text('new value'); }) thank you.
Array index/position problem
I'm trying to isolate a single element in an array that is being instantiated by: var $content = $('.content'); I've ensured that the array does in fact have elements (by testing with .length) but when I try to apply a method/function to $content(0) or $content[0] I get nothing. The code runs fine if I simply call $content.myFunction; so its not the function itself. What am I missing?
Javascript Functioning slow in firefox
hi Guys, i have developped a website using the[url=http://www.coastworx.com/bookflip.php] Javascript BookFlip [/url] URL: http://www.gunwebsystems.biz/ViewCatalog.aspx?catID=57 Everything works fine but when i have too many pages on my site..it flips very slowly in firefox..but works well in IE7, chrome, n safari. could somebody help me on this.
[jQuery] relative positioning spans inside cluetip
i'm using inline styles to position some <span>s inside the cluetip. using an ajax loaded cluetip. they are ignoring the positioning css. however, when i open the page directly in my browser, everything is properly positioned. fyi, i put some color to the text using css just to see if inline styles were ok in cluetip. the color works fine. here's some of the code: <div style="width:500px;overflow-y:275px"> <table width="100%"> <tr> <td align="center">Time (hrs)</td> </tr> <tr> <td> <span style="position:relative;left:0;top:0;text-align:left;">4pm</
[jQuery] New topic
Dear Friends, I had posted a new topic half an hour ago which is not showing up??? any ideas? thanx
[jQuery] Licensing Question
I've got a quick question for all the licensing gurus who happen to be on or about the list. I'm developing a plugin for jQuery for a company, and want to release it as open source with a non-competition stipulation. Is it possible to release the code under something like a Creative Commons license where it's free for non corporate use, but requires companies who seek to use the product in a commercial sense to seek a license? I ask only given the dual licensing of jQuery under both the MIT and GPL
[jQuery] error when using ui.mouse.js
Hi There, I'm getting a weird error when I try to use this script ui.mouse.js in my page. The drag and drop functionality seems to be working fine it's just generating an error. Can someone tell me what i'm missing to initialize this? !-- error from firebug $.ui[module] has no properties add("droppable", "activeClass", Object) ui.mouse.js (line 10) (no name)(function()) ui.droppable.ext.... (line 10) [Break on this error] var proto = $.ui[module].prototype; !----- html code 1: 2: 3: 4: 5: 6: 7: 8:
[jQuery] event fires exponentially
Hi guys, I have this piece of innocent looking code: <script> $(document).ready(function(){ $form = $('#filter-form'); $form.ajaxForm({ //dataType: 'json', success: function(){ alert("peng"); }, target: "#layout-child-output" }); $('input', $form).change(function(){ $form.submit(); }); }) </script> If I check one checkbox, I get one submit, for 2 2, however for 3 4, for 4 16, and so on until the server crashes. Any idea what
[jQuery] History Plug-In
Hi all, This question has been asked before but there weren't too many good answers. I'm looking for a decent history plugin for jQuery. I have a page which has a table which gets updated asynchronously, and I'd like the browser to think of each update as a new page so the back button works. I've read about a jquery ui history plug-in, but I can't find it on the jquery ui pages. I've tried the History jquery plug-in, which may work for my needs, but there's no documentation and only one example which
[jQuery] Access Elements Rendered in a Thickbox
Hey all - I'm looking for/wondering whether there is a way to access an element loaded in a thickbox. I have a page that launches thickbox to load a form. I need to be able to set a click() event listener on the submit button of that form so that I can submit the form via ajax. Unfortunately, I can't come up with a clever way of doing that. Any ideas? I tried (just for the sake of eliminating the obvious) applying the event listener on document ready, but no luck, of course, since I assume that the
[jQuery] ClueTip Custom Close Button
I am using a div content present in the same document to show up in cluetip. I want to use a custom button inside that div content to close the tip when clicked. I don't know how this can be achieved. Please guide me through this. This may be very trivial, I am not sure how to get this done. By the way, Cluetip rocks. Many thanks.
[jQuery] Why won't this work?
Why won't this... <script type="text/javascript"> $(document).ready(function(){ $('#emailError').hide(); }); </script> hide this... <p id="emailError" style="color:red;">Please enter your email address. ??? Rick
[jQuery] Is this syntax correct?
I get no errors, but no response, either. I tried just using $('#emailaddress').blur... without the "input", but then I got a val undefined error. <script> $(document).ready(function() { $('input #emailaddress').blur(function() { if (this.val.length == 0) $('#emailerror').show(); }); }); </script> Thanks, Rick
[jQuery] Trying to assign onClick to a link
Hi everyone, I'm very new to jQuery and am trying to have a div toggle between hidden and shown using the slideToggle function. This is my code that I have in the head of my html: $(document).ready(function(){ $('a#link').click( $('div#bugDiv').slideToggle('slow') ); }); The link that I want to associate the onClick to has an id of "link" and the div has an id of "bugDiv". Right now, the way it works, the bugdiv slides to hidden on load, as though it's just executing the code
[jQuery] $(document).ready on an ajax return?
I'm using a $.get call to get the contents for a dialog box and I'm trying to run the $(document).ready on the ajax return like so: parentPage.html: $.get('desiredContent.html',function(data){ $("#dialogBoxDiv").html(data); $("#dialogBoxDiv").dialog('open'); } desiredContent.html: $(document).ready(function() { alert("content loaded!"); }); this works fine for firefox, but ie won't run the $(document).ready() function on the desiredContent page. Is there a way to do this that will work in both firefox
[jQuery] Suckerfish z-index issues in IE
Hi, i'm struggling with IE6 and IE7 z-index issues on the suckerfish flyout menu. The flyout menus fall behind all content even if I make sure the menu is the last html item in the page. You can see the problem here http://point-online.org/tests-resources-books/sftest/submenu3.html
[jQuery] One click spreadsheet from table
Thinking out loud.... I want to create a one-click solution that turns any table into a CSV file and opens the CSV file with whatever app is the default for .csv files. I know that I can turn any result set into a CSV file with PHP, but that involves writing a file to disk and then prompting the user to go open the files with whatever spreadsheet program. Plus, I'd have to implement it one result set at a time. On the other hand jQuery could order and filter the results on the client side (already
[jQuery] Smart image resizing "Idea"
Smart image resizing "Idea" Dears, I am new to JQuery.I have an idea I want to share with you and i hope one of the programmer write the code for it. the idea is to resize an image to a custom width and keeping the relation between the width and height ,for example: * if the width less than 600px ---> do nothing "no need to change" *if the width =1000 and height=500 ----> reside to: width=500 and height=250 "the height is still 50% of the width" *when the resided image is clicked, pop up a windows
[jQuery] SimpleModal v1.2 released
A new version of SimpleModal has been released. It contains a few improvements and fixes for browser related issues. There are some new options and a few that have been deprecated, so make sure to check out the project homepage for a list changes and upgrade details. Homepage: http://www.ericmmartin.com/projects/simplemodal/ Demos: http://www.ericmmartin.com/simplemodal/ Plugin Page: http://plugins.jquery.com/project/SimpleModal I've also updated the contact form demo to include a subject and cc
global variable how to ?
hi every body, how to do this; var mydata="init_value"; $.post('http://myurl', {},function(result) { mydata=result; }, "json"); alert(mydata) //display "init_value"; //I want to display the new value getting from callback function thank's a lot!
[jQuery] mod'ing pseudo-classes...possible?
I'm using a sprite as a background image for a collapsible pane. It has for states closed off, closed on, open off, open on. When the pane opens, I want to move the background image so it's in the 'open off' state, and then, on mouse-over, whos teh 'open on' state. I can easily get former to work, but the latter doesn't seem to be working--at least via the method I'm using: $(".detailsPaneToggle").children("a").css('background-position','0px -35px'); $(".detailsPaneToggle").children("a:hover").css('background-position','0px
[jQuery] Star Ratings - update value from callback
Using the most excellent Star Ratings from fyneworks.com (v2.5) - I'd like to be able to set the current value of a ratings object from an external function. We use a callback to post the rating value to an ajax handler, which then returns the new average rating for that item. E.g. 4 users have rated an item, average is 4/10. 5th user rates it 9/10, new average is therefore 5/10. Here's what I'm coding: $('div.userRating input').rating({ half: true, callback: ratingCall }); function ratingCall(value,
[jQuery] superfish - font colors
Is there a way to have one color font for the main nav. link and a different color font for the links in the drop downs? (This is my first time working with Superfish.) A demo/draft page with my progress is at... http://www.gofullsail.com/1-base-l2b.html I would prefer that the drop down text could be white, for which I would have a black background (which I see how to apply). Thank you.
[jQuery] [autocomplete] Options
Where can I find a complete list of all the available options of the jQuery Autocomplete plugin?
[jQuery] Is there a way to call scroll from outside jQuery.?
Thank for this great plugin. I have one problem. I have created two carousels fetching images with Ajax, on the same page. First carousel displays and scrolls only one image each scroll. The second carousel displays and scrolls 4 images each scroll. This carousel is supposed to be a thumbnail list previewing the images to come in the first carousel. What I would like is, when I click on say image 4 in the second carousel, I would like the first carousel to scroll to that index. I have managed to
[jQuery] [Selector] Selecting Similar Elements Until Reach The End of Loop
Hello, I'm new to jQuery and found this as my first problem that I can't solve so far. I have a case of selecting an element to perform specific event to each of them. For quick explanation please see this: <ul class="tabnav"> <div style="margin-left: 40px;"><li><a href=#content1>Click to Show Content 1</a></li> <li><a href=#content2>Click to Show Content 2</a></li> <li><a href=#content3>Click to Show Content 3</a></li> </div></ul> <div id='content1' class='tabContent'>Content 1 Here</div> <div id='content2'
[jQuery] jQuery becomes Unresponsive
Hi, I have a table of data made from divs, and the mouse roll-over highlighting is done using jQuery. But now I have added "real" data, the data table (about a thousand rows) is a lot bigger. The problem is, jQuery becomes unresponsive and Firefox throws the error: A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. Script: /views/js/jquery.js:19 My code for the row highlighting is: $(document).ready(function(){
Click event not working in IE but does in FF.
I have a page that consists of two ASP.Net listboxes and I am using the document.ready function to bind the click event to each option element within the listboxes. So when you click on one option, it's supposed to move to the next listbox; and vice versa. This works perfectly in FireFox but not in IE, go figure. But no javascript error is thrown, so not sure where to begin on issue. I've read in some forums that document.ready has some problems with IE and I'm also thinking it could be the way that
[jQuery] [jCarousel] resizing slow with a fluid height
Hey, I'm using the jCarousel to fill a page vertically, while the remains fixed. In order to do this I wrote a function that gets the height of the browser window and then sets the height of the carousel to the browser. var getHeight; function setCarouselHeight() { getHeight = 0; if ($.browser.opera){ getHeight = window.innerHeight; }else{ getHeight = $(window).height(); } getHeight = getHeight - 37; //extra padding for carousel buttons/ chrome $(".jcarousel-container-vertical").height(getHeight);
[jQuery] [autocomplete] Problem with Scrolling IE 7
Konqueror and FF2 work just fine but the side scrollbar doesn't appear when I try this basic test in IE 7.0.5730.13. The scrollbar does not work here: http://kittyslayer.ucdavis.edu/jquerytest/system/application/views/jquerytest.php However, the demo site actually works: http://kittyslayer.ucdavis.edu/jquerytest/js/jquery-autocomplete/demo/ I swear I'm doing the same thing in both. What am I doing wrong?
[jQuery] How to link myFunction(this) to a div
Hi I'm new to jQuery and here's one thing that doesn't make sense. How do I link an existing function with "this" as argument to a div? The function to be called is really simple: function test(e) { alert(e.id); //Also tried e.getAttribute("id") or e.attr("id") } Here is what I tried so far inside the $(document).ready(function() {}); part: $("div.someClass").each(function(){ $(this).test(); }); $("div.someClass").each(function(){ $(this).test; }); $("div.someClass").each(function(){ $(this).click(test);
[jQuery] [validate] Naming rules by class
Can I name the validations by classname, in order to verfify all fiuelds that match with specified classname? For example set that all input that have a class "date" (<input class="other_class date ..." ...) will be checked in required, min and max lenght an others. Thanks in advance.
[jQuery] Product Category Browser
I am attempting to make a product category browser within jquery and I am trying to find a good starting point. The trees I have looked at so far are 1. treeview 2. simpletree 3. dynatree Dyna tree is the one I am most interested in since it focuses on the dynamic loading of nodes/sub categories after a user has clicked on a parent category. (the sub cats are generated via an ajax call returning a JSON data object - results set) Treeview worked fine until I came to the point where I wanted to add
[jQuery] ajax error handling troubles
$.ajax({ async: true, url: testingURL, success: function () { location.reload(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log('error throw'); console.log(errorThrown); } }); the requested page can return 404 or 403 error codes but the errorThrown variable is ALWAYS undef... any idea ??
[jQuery] jQuery and PHP form problem
Hi all, I've been messing around with jQuery (which is pretty cool), but I'm having an issue with jQuery form binding and PHP $POST variable processing. Basically, what I'm running into is my php branch is not executed while the form has an id (jQuery is taking precendence). If I remove the id, the php branch works, but then obviously the jQuery code doesn't run. Anyone have any ideas how I can get both to run? Can I put php code in jQuery code? I've tried to but so far have not had success! Below
[jQuery] validate : dependency based expression to check for a filled field
I'm trying to use the dependency to make a field required only if a field is filled. I tried phone3:{required: "#phone1.val().length > 1", rangelength:[3,3], digits:true}, but this did not seem to work. Any ideas? thanks
[jQuery] open-closed divs
Hi; This is my open-closed divs: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:// www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9"> <title>Untitled Document</title> <style> #category { background:#0F0; height:83px; width:100%; } #index { line-height: 22px; background: #303030; float: left; height: 22px; width: 630px; margin-right:3px; } /*button control*/ .buttonControl { float:
[jQuery] validation plugin: don't insert error element
Is there a way to instruct the validation plugin to not insert any error element?
[jQuery] jQuery.data() identifier not working
Hi, I've found a VERY strange behavior while developing a little code. I'm trying to identify some elements with the jQuery.data(element) function, this returns a "unique" id for each element (AFAIK). But the strange this is this little code of jQuery: var id = elem[ expando ]; // Compute a unique ID for the element if ( !id ) { id = elem[expando] = ++uuid; } this is part of the data function (~line
Next Page