[jQuery] Array Help
Hello All, How would I go about creating something like: $(document).ready(function() { $('#test').somefunction({ name: 'something', images: [ { src : 'images/baseball.jpg' thumb : 'images/thumb_baseball.jpg', title : 'Image Title Here', description : 'This is an image description here...', }, { src : 'images/soccer.jpg' thumb : 'images/thumb_soccer.jpg',
[jQuery] appending ajax form and inserting form input
Hello there, i'm new to jquery, and i have this problem. i have this button that will add a group of inputs on a form $('#actionbutton').click(function() { window.open('addaction.asp?oID=<'%= Session("orderID")%>','myWindow','width=800,height=600'); var $old = $("#actionDiv").html(); $("#actionDiv").load("addaction.asp?actionNumber="+actionNumber +"",function(){ $(this).prepend($old); actionNumber = actionNumber + 1; }); }); in addaction.asp, there is an action that will add another input file. the
[jQuery] Styling JavaScript Generated Markup
I'm trying to add a PNG Overlay to some of my images, but every solution I've seen requires extra markup. Example 1 has the extra markup and Example 2 attempts to add the markup via JavaScript and then use my existing stylesheet to style it. If I view the generated source, I see the markup, but it's not getting styled. Is there any way to do this without putting the style in the JavaScript code? THX -=Example 1=- CSS: .overlay { background: transparent url('/graphics/themes/default/story-icon-
[jQuery] newbie question: $(this)
This is probably really obvious but here goes. I have about six items that I want to toggle the visibility of. I've got it working on one of them with the code below but when I add more than one the event fires on all the items at once instead of the one I clicked. I'm guessing I need to use the $(this) function but I haven't found anything that is helping. $(document).ready(function(){ $("a.bio").click(function(event){ event.preventDefault(); $("span.invisible").toggle("slow"); }); }); thanks.
[jQuery] FlyDOM: Having trouble creating DOM elements on the fly
Hi, I just downloaded the plugin to help create DOM elements on the fly (http://flydom.socianet.com/). I'm trying to add elements to an unordered list. I have an empty unordered list to start: <ul id="categories"></ul> but this code $(document).ready(function() { for (key in g_gosArr) { $('#categories').createAppend( 'li', {}, [ "text" ]); } // for }); adds "<li><text/></li>" to the dom and I want to add "<li>text</li>" to the DOM. How can I correct the above? Thanks, - Dave
[jQuery] SlideUp / SlideDown Toggle Issue
I'm trying to make the utility sections (e.g. "Downloads" and "Site Statistics") slide up/down when you click on each section's respective header. In all of the browsers that I've tested (Opera 9.51, IE 7, Safari 3.1.2, Firefox 3.0.1, Firefox 2) you have to click on each header to *initialize it* and then it will work as intended (i.e. toggling with one mouse click). While I was testing, I found that if I remove the "siblings" it works without the *initialization*. Any help would be greatly appreciated.
[jQuery] How to make the .ready fire earlier
I have some jquery code in a $(document).ready(...) block. In my html I have script tags in the body, which loads remote objects. The jquery code is conditionally hiding some elemnts on the page. Now, the remote object load after the page has loaded, and jquery .ready fires after the remote objects are loaded, which means my users see the elemts which should be hidden, and after a delay getting it hidden. How can I make the jquery .ready fire after the document has loaded, but before the remote objcts
[jQuery] Clone element based on user input
I am wondering if it is possible to clone an element, a certain number of times based on user input. So, if I wanted to clone a tag 5 times, I would enter 5, and it would close that element 5 times. I was looking at the .clone() method, but I was unsure if this was possible.
[jQuery] have the user selected text from "P" copied to a "textarea" when button is clicked.
I want any highlighted/selected text from any paragraph on the page to be copied to a textarea when the user clicks a specific button. Kind of like the way Google Notebook allows you to copy highlighted text into your notebook when you click that button. I've been trying to figure it out, but I'm sort of new to Jquery. Thanks!
[jQuery] XML processing in Firefox 3 and IE7 using jQuery
I use following code to process the XML I get from server and populate we page using it. function loadProcessInfo() { try { var response = ProcessManagementService.listAllProcesses(); var processInfoList = $(response).find('process-info-list'); populateData(processInfoList); } catch(e) { if (typeof(e) == "string") { alert("Exception occured:\n" + e.toString()); } else { alert("Exception occurred!"); } } } function populateData(processInfoList) { var contentHTML = '<h2>Currently Deployed Processes</h2>';
[jQuery] have the user selected text from "P" copied to a "textarea" when button is clicked.
I want any highlighted/selected text from any paragraph on the page to be copied to a textarea when the user clicks a specific button. Kind of like the way Google Notebook allows you to copy highlighted text into your notebook when you click that button. I've been trying to figure it out, but I'm sort of new to Jquery. Thanks!
[jQuery] have the user selected text from "P" copied to a "textarea" when button is clicked.
I want any highlighted/selected text from any paragraph on the page to be copied to a textarea when the user clicks a specific button. Kind of like the way Google Notebook allows you to copy highlighted text into your notebook when you click that button. I've been trying to figure it out, but I'm sort of new to Jquery. Thanks!
[jQuery] jQuery UI Tabs
When using the jQuery UI Tabs (http://docs.jquery.com/UI/Tabs) on a page, the <ul> making up the Headers is sometime visible in Internet Explorer 7 for a short period of time while the page is loading. Is there anything I can do to prevent this?
[jQuery] [Validate] place the error after a * in the same line
I have a table less form where the lines are like such: <label for="firstname">First Name:</label> input name="firstname" type="text" maxlength="100" size="20" /> *<br /> It there anyway to get the error appended AFTER the * and BEFORE the <br /> ? Thanks Steffan --------------------------------------------------------------- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline Steffan@ExecuChoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309
[jQuery] Create array from checkbox id's
I am trying to create an array using the .map() method made up of the ids of checked checkbox's. I am then wanting to use alert, to alert each id to the user one at a time. $("#testLink").click(function() { var array = $.map($("#text input[@type='checkbox']:checked").attr("id"), function() { return this.id; }); alert(array); }); <input type="checkbox" class="itemCheckDelete" name="test1" id="test1" /> <input type="checkbox" class="itemCheckDelete" name="test2" id="test2" /> <input name="test3" type="checkbox"
[jQuery] problem of using ajax
Background: I use google app (domain: www.example.com ) to save some static pages before. Now I want to use google app engine(domain: apps.example.com) to generate some dynamic and interactive elements and put thoes elements in my google app static pages . I try to solve this problem by using some solutions. Solution 1: Use google app engine to generate dynamic html response at first, and then use iframe at google app static pages to link those dynamic html, finally show those html on the browser.
[jQuery] Tablesorter Plugin: Leave one column untouched
Hi, I'm using the tablesorter plugin. The first column of the table is "Position" (i.e. 1,2,3 etc). When I sort, I'd like this column to stay the same (e.g. if the table is resorted by a criteria, they are still placed with 1 at the top). Is this possibel or will I have to abandon tablesorter and go back to server side sorting? Best, DTH
[jQuery] missing ] after element list
Hi everyone, I'm pretty new to Javascript and Jquery. Despite my ignorance about Javascript basics, Jquery lets me do useful stuff. I've created a join statement and get a "missing ] after element list" error in Firefox for PC. I also have a setTimeout statement to prevent unresponsive script messages in Firefox. The setTimeout idea came from this group, so thanks for that. Here's my code: //unresponsive scripts prevention after 2 seconds if(new Date().getTime()-start>2000){
[jQuery] [metadata] Defeat the default caching behavior
I'm using the metadata plugin to manage state for several elements of an editable data table. In some cases I change the metadata in an element following a save and I want to pick up the latest the next time I access .metadata() on that element. However, I only ever get the first set value. I've posted a working example of my issue here: http://markmiller.ca/jq/index.html I've read the docs and search the group for metadata and cache without coming up with a solution. Any suggestions or advice is
[jQuery] LAUNCH: yaf.me
Hi all, Pleased to announce the launch of the jQuery / UI Tabs powered yaf.me URL shortening service. Got a few things I still need to add it but I thought I'd gotten far enough to get it on the web and get some feedback: http://yaf.me/ Will shorten any URL you give it to 11 characters. Pretty handy. :) Regards, Michael Price
[jQuery] Page Manipulation problem On IE
http://paste.pocoo.org/show/80123/ When I click on link it added onclick event to itself, But when I click again on this link it will not call myfunc() to alert. It is working fine with Firefox but not with IE.
[jQuery] jQuery Forms bug in IE with field
Hi, I've been using this plugin for a while and I've to say that it's awesome. However I've spent hours figuring out what was happening in IE if I had a hidden field with a value that was exactly the same as the form name: <form name="myform" action="calculate.html" method="post"> <input type="hidden" name="target" value="myform" /> .... </form> In Firefox it works ok but in IE it gets an error and the form is not submitted correctly being redirected to calculate.html. I hope you can have a look
[jQuery] how to format the ajax data from .php
i'd like to know is there any available format to re-form the data from the php executing result?
[jQuery] Feedback on new plugin: wrapSelection
My coworker and I have created a new plugin called wrapSelection that wraps highlighted text with valid XHTML span tags and returns as a jQuery object for chaining additional commands to that element. This was originally designed to allow end users to select text (highlight text with their mouse) and change the background style. Unlike other solutions that apply to the whole element, this creates XHTML compliant span tags around the selection area. http://plugins.jquery.com/project/wrapSelection
[jQuery] multiple jquery cycle slideshows behaving strangely
Hi I have adapted a script found in the cycle demo website, to add multiple slideshows to a page, however, I am experiencing a problem. Just to be clear, I have hard-coded 2 sets of divs in my html, with correct ids for the slideshow div and the slideshow buttons UL. Here is an example of one of them: <div> <div class="column780px"> <div class="slideshowcontrols"> <div class="play"><a href="#" title="Play slideshow">Play slides</ a></div> <ul id="sb1" class="slideshowbuttons"></ul>
[jQuery] element replace question
I wish to use jQuery to replace a number of checkbox elements with image tags: <input type="checkbox" value="25" /> <input type="checkbox" value="42" /> to be replaced with: <img src="pic.jpg" onClick="foo(25)" /> <img src="pic.jpg" onClick="foo(42)" /> I am successfull in selecting the checkboxes and using replaceWith to replace them with img elements, but replaceWith returns the checkbox element which is gone, so I apparently can't use it to add a click() function to the newly created image element.
[jQuery] Dblclick ajax loader repeats on all previously clicked elements
When a user double clicks on an element on my site an AJAX call is made. During the AJAX call I have a loading gif in the space they clicked on. For some reason, whenever another element is double clicked all the elements that have been previously double clicked on also show the loading gif again. Can anyone tell me how to stop this happening? Code: $(document).ready(function() { $('a.flagged').dblclick(function() { var elId = $(this).attr('id'); var myId = elId.substr(8);
[jQuery] [validate] Validate elements without actual form
Does anyone know if there's a way to validate a set of elements (ie within a div) without having to pre-validate the actual form to start with? Problem I have is that I have a page long form and for one part of it (one of the blocks as a div), I am presenting as a dialog (using blockui however also tried using UI's dialog) and want to validate only that portion onsubmit (of the dialog). However it seems that if the pre-validated form is outside the dialog/ modal box, I get all sorts of javascript
[jQuery] UI/Tabs - events
Hi all! I use UI/Tabs and I have some questions about it: 1. Is writing an event handler like: $('.ui-tabs-nav').bind('tabsselect', function(event, ui) { ... }); the same as: $('.ui-tabs-nav').tabs({ select: function(ui) { ... } }); I've found both versions on UI/Tabs documentation page and can't see the difference. 2. I've discovered that in: a. tabsselect event ui.index - is a newly selected tab ui.options.selected - is previously selected tab b. tabsshow event ui.options.selected - is a newly
[jQuery] AjaxForm and Validate without window-level variables
Hello again all, I'm attempting to use Mike Alsup's excellent AjaxForm plugin with Jörn Zaefferer's handy Validate plugin, and so far I've had great success setting up both, then hooking them together by returning the result of Validate's .valid() method from beforeSubmit on the AjaxForm setup (see example code link at the bottom). Basically, .valid() returns boolean true or false, and that result gets returned from beforeSubmit, halting the ajaxForm GET or POST. It works well, but to keep track
[jQuery] Media programming part.....
HI, I would like to know what is the best way to make your own custom media player?? I am planing in a a couple of weeks to make my own media player. I want to make a media player that I can load in certain encode and decoders. To allow certain media formats. What can Jquery do in terms of customize media player??
[jQuery] Why does my closure not seem to share scope?
var a = $("<span><<</span>").click(function() { pageClicked(page-1); }); $("#pages_panel").empty().append("Page: ").append(a); for (var i = 1; i < totalPages + 1; i++) { $("#pages_panel").append($("<span> " + i + "</span>") .click(function() { pageClicked(i); console.log("i:" + i); })); } It properly prints out 1 2 3 4 5 etc., but when clicking on any of them, the console.log output of this code is "i:6" for every page. So I guess it's referring to the value of i after the for loop is completed.
[jQuery] querying JSON
Surely this is totally obvious and basic... but I can't seem to figure it out: var myJSONreturnObject = [ {Name: 'hello",Id:11}, {Name: 'hello again",Id:22, SubItem : [ {Thing:"something",Id:234987}, {Thing:"something else",Id:982734}, ] }, {Name: 'hello once more",Id:9}, ] I want to do some sort of query on a JSON object like "SELECT * FROM myJSONreturnObject WHERE myJSONreturnObject.Id = 22" i started with: if(myJSONreturnObject.Id==22) ... and now I'm totally stumped.
[jQuery] Draggable by proxy
Can I (and if so, how) drag an element without actually mouse-downing and -moving on the element I want to move? For reasons I will happily explain, the user can't actually click on the object I want them to drag. So can I get them to click on something else and then have that pass the dragging info to the real draggable element? (Just to be clear, the proxy mustn't move - I just want the events of mousedown/drag to be forwarded to the real draggable element). Many thanks. Regards John
[jQuery] Manipulating Elements After Ajax Call
Hello Jquery Community I am new to jquery/programming. I have performed a simple ajax operation it could be either $.load or $.get but I picked $.post The request works great however because it's ajax the new elements are not a part of the html (right?) I want to then perform jquery functions on the newly loaded elements....so I'm wondering if someone can point me in the right direction. 1. Am I correct inj my assumption that the new elements are not apart of the DOM? 2. Do I need to return the post
[jQuery] Getting next element with exact class
I am posting my first thread here so I would like to say Hello first. Now, here is the problem. I have a table. Lets see the example. <table> <tr><td>1</td><td class="niceclass">1</td><td>1</td><td class="niceclass">1</td></tr> <tr><td>2</td><td class="niceclass">2</td><td>2</td><td class="niceclass">2</td></tr> <tr><td>3</td><td class="niceclass">3</td><td>3</td><td class="niceclass">3</td></tr> </table> Some cells have also a class "niceclass" and I want that if I click on any of these cells with
[jQuery] Remove and Recall Function? css Positioning question
I'm using the excellent TimePicker plugin (http://labs.perifer.se/ timedatepicker/) and it works amazingly well; however, as the DOM is ready it positions the time select right above the input field: His code: $tpDiv.appendTo('body').css({'top':elmOffset.top, 'left':elmOffset.left}).hide(); The problem is that I am toggling an element vertically and when the page grows the resulting list remains in the original position. Is there any way that I can remove a function and recall it when I'm toggling?
[jQuery] Read CSV files with jQUery
How Can I read CSV files with jQUery http://download.finance.yahoo.com/d/quotes.csv?s=USDIRR=X&f=sl1d1t1ba&e=.csv for Example above code ... I want to COnvert Iraninan RIal to American Dollar online in my Website .... has anybody any idea for this ...
[jQuery] Changing attributes
Hi all, Here is my question, i have a list (called from a database) <list> <item> <name>firstitem</name> <display_order>1</display_order> </item> <item> <name>seconditem</name> <display_order>2</display_order> </item> <item> <name>thirditem</name> <display_order>3</display_order> </item> <item> <name>forthitem</name> <display_order>4</display_order> </item> </list> using jquery's sort lib i can sort the list on screen the question is how can i change the display_order value and post that change to
[jQuery] Hmm... Got stuck at 1 point.
I got one question mark over my head and I please someone for little help. I have this $j.ajax({ type: "POST", url: domain+"pages/groups/add/about", data: "action=start", error: function(msg){ $j("#progress").addClass("progress-error"); $j("#progress #pmessage").text("Ops! There was error with loading... Please report problem!"); }, success: function(content){ $j("#tabs").append(content); $j("#progress #pmessage").text("Loaded...
Next Page