[jQuery] Intelligent ways of DOM manipulation
Hi there, I need some advices about DOM manipulation . I want to push some piece of html code to document with jQuery and JavaScript in general.(ie. I want to create widget containing close and minimize buttons and contents block with only calling for example $ ('#widget-div').createWidget() ). I think if I will do it by creating elements and adding attributes and nodes to it, it can harm performance of rendering, so I'm now doing it by creating string containing markup of widget, then appending
[jQuery] Example of how to set scale options for jQuery UI
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 12 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face
[jQuery] Tablesorter & Pager Problem
<html> <head> <link rel="stylesheet" href="/css/custom-theme/jquery- ui-1.7.custom.css" type="text/css"> <link rel="stylesheet" href="/tablesorter/themes/blue/style.css" type="text/css"> <link rel="stylesheet" href="/pager/jquery.tablesorter.pager.css" type="text/css"> <script type="text/javascript" src="/js/jquery-latest.js"></script> <script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="/js/jquery.tablesorter.js"></ script> <script type="text/javascript"
[jQuery] process jquery on ajax loaded content
Hello I have question about JQUERY. Im using $(".item").draggable({ revert: 'valid' }); // for making draggable content Im inserting data to PHP file by $.post("insert.php", { name: "123", time: "123" } ); After insert im loading actual content by $.ajax({ url: "view.php", cache: false, success: function(html){ $("#results").append(html); } }); I need to load data from view.php and i would like to make this ajax loaded data draggable ! if i load <div class="item">item1</div> it is not draggable !!
[jQuery] Thickbox and loading a url with '?' parameters
Subject pretty much sums it up. Thickbox uses ?param1=xx¶m2=yy to load content into an iframe. The problem is the url I want to load also contains params. So I end up with mysite.com/index.php?x=1&y=2?param1=xx¶m2=yy and it only loads mysite.com/index.php Any way to work around those or a more viable solution?
[jQuery] HTML :contains selector equivalent
Hey, One component to my current project involves retrieving various blocks of text and html from a database that are displayed on a website (a website that is composed of the same blocks of text and html from the same database) via $.getJSON, and thereafter locating each of the retrieved blocks on the page and wrapping them with some sort of tag. Normally I would do this through PHP, simply inserting the tags around each of the variables that contained information from the database however under
[jQuery] [tooltip] Persistence
Is it possible to make tooltoips persistent, i.e. you have to click to remove? Cheers, H
[jQuery] Ajax loaded pages..
Ok, i got problem. When i load some page with jquery ajax i cant use javascript on loaded page. For example, when i load gallery.htm in some div in index.html, lightbox wont work. Is this usual or..?
[jQuery] order of ajax calls
Hi All! I have this script: $(document).ready( function(){ $('#movies_menu').click( function(variable_main){ $.getJSON(\"\/movies\",function(moviesLibraryvar_800925333){$('#grid').html(moviesLibraryvar_800925333)}); $.getJSON(\"\/moviesbuttons\",function(moviesButtonsvar_2070324278){$('#buttons').html(moviesButtonsvar_2070324278)}); }).mouseout(function(){$('#movies_menu').removeClass(\"actionTitleMouseOver\");}).mouseover(function(){$('#movies_menu').addClass(\"actionTitleMouseOver\");})}); This
[jQuery] Superfish rounded corners.
Yes, another superfish question (my last one tonight i promise) Has anyone figured out an easy way to round the corners of superfish menus much like: http://www.ea.com/ It doesn't seem to be that there is an easy way with the standard jquery corners plugin.
[jQuery] TableSorter. Pager issue.
Ok, I have tried to solve this issue for few hours without any success. I have latest Jquery, TableSorter and Pager files. This is whats going on. when I use table headers to sort its working flawless but when I use Pager (at the bottom, page navigation and table size) I am getting Javascript error "unidentified is null or not an object" which is pointing to Pager script (jquery.tablesorter.pager.js). In the script it seems like table.config is turning out to be "unidentifed" in the error I mentioned
[jQuery] keypress, keydown + backspace : Firefox, Chrome, IE
Hello, I check the keycode, for all input (text) of the page, like this : $(document).ready(function() { $("input[type=text]").bind('keypress', function(e) { var code = (e.keyCode ? e.keyCode : e.which); if (code != 0 && code != 9 && code != 45 && code != 99) { ....... } }); }); But for one specific input, I do this (number only) : $(document).ready(function() { $("#HourByWeek").keypress(function(e) { var code = (e.keyCode ? e.keyCode : e.which); if (code != 8 && code != 0 && (code < 48 || code >
Click to keep expanding size of div
Hi, I have a div which I want to increase in pixel size by 10px each time a button is checked. The change in size needs to be animated. At the moment, I can only get it to increase to a fixed dimension: $(document).ready(function(){ $("#expand").click(function(){ $(".my-div").animate({ width: "10px" },1000); }); }); How do I get it to keep expanding by 10px each click? My Javascript/jQuery isn't great, so sorry if this
[jQuery] Convert Jquery to Mootools
Hi I have developped this function in jquery for a website, and i have to use it on another site which is using mootools. I've tried to convert it, but no way to make it works. So i ask for your help. The goal of this 2 function is to have a good view of my banner, without the gap of one or two pixel due to the resolution of users. Thanks you and sorry for my bad english. $(function (){ var pos = $("#page").get(0); $("body").css("background","#727271 url(squelettes/images/ axome_fond.gif)
[jQuery] show() hide()
I have this simple code, slides down and up smoothly in Firefox but is choppy in IE when I added the hide() and show(). Please what is wrong wih it? $(document).ready(function() { $("#open").click(function(){ $("#hideme").hide("fast"); $("div#panel").slideDown("slow"); }); $("#close").click(function(){ $("div#panel").slideUp("slow"); $("#hideme").show("slow"); }); $("#toggle a").click(function () { $("#toggle a").toggle(); });
[jQuery] jQuery Animation problem
Hi all, when clicking an item on my website, it has to expand so you see some more options (links). Now, when I want it to appear, I have to click it twice, after I clicked it twice, it works perfectly with one click.. Anyone who can help me out here? You can find the code on: http://www.spurtersite.aclebbeke.be/spurters.php
[jQuery] set charset of request header in jQuery.ajax
Hi i have an Oracle DB with WE8ISO8859P15 charset and a website with ISO-8859-15 charset in headers. Until I use jQuery all works fine, but now i'm using an ajax function to submit a form inside a jQuery ui dialog, like this: <script type="text/javascript"> jQuery("#btn_submit").click(function(){ jQuery.ajax({ type: "POST", datatype: "script", scriptCharset: "ISO-8859-15", url: [some url], data: jQuery("#form").serialize(), beforeSend: function(xhr) { xhr.setRequestHeader("Accept-Charset","ISO-8859-15");
Problem getting the Pagination Plugin to run
Hey everyone, i'm new here but I've seen that this problem has been reported by a couple of others and never been answered. I hope someone will be able to help me because even in the official issues forum there are a couple of threads about this that remain unanswered. The jQuery pagination plugin I'm using works like a charm as long as I display only one item per page. Now, since I'm trying to use this for the creation of a multiple choice form with about 80 questions, I'd like to display 10 items
[jQuery] Username availability check and form validation
So I have a JQuery/ajax username availability check function which calls a file check.php that scans the database for existing username and lets you know if the one typed in is occupied or not. And this availabilty check is inside a registration form witch has some simple validation rules like required password, required email... The only think that is getting me frustrated is that even if the uname function says that the "username is not available" the form lets me through and I can still press
problem to validate dynamic form
Hi All, I have a form like this.. ______ <form name="DynamicForm" id="DynamicForm" method="post" action=""> <table border="0" cellpadding="2" cellspacing="0" width="100%"> <tr> <th>Relation</th> <th>Name</th> <th>Address</th> <th>Age</th> </tr> <tr> <td align="center"> <select name="RELATION-CD-1" id="RELATION-CD-1"> <option value="">--Select--</option> <option value="1">Father</option> <option value="2">Mother</option> <option value="3">Brother</option> </select> </td> <td align="center"><input
Loading images into a div
I'm new to using jquery and am trying to learn a few tricks. I am currently using the scrollable jquery plugin to scroll some images of thumbnails in a gallery. What I'm trying to do now, is figure out how to load the large version of those thumbnails into a div when they are clicked. Here is a link to the webpage where the source can be viewed. http://www.tsutsumidaphoto.com/Mihoko/akiko2.php Any insight or resources that could point be to the right direction would be great. Thanks!
[jQuery] Call for contributors: A simple, fast and flexible grid/spreadsheet component.
Hey All, I've been working on a grid/spreadsheet control prototype during the last couple of weeks. Seeing how there doesn't seem to be a lot of other choices for this sort of thing, I had to write my own. I've put the project up on Google Code and am looking for experienced developers who can pick this up and turn it into something that everybody can use (a jQuery UI grid plugin?). The project is hosted at http://code.google.com/p/slickgrid/. Below is a copy of the project home page. Looking forward
[jQuery] jquery.ajax executes error function for Web Server HTTP 201 Response
Hello, I am using jquery.ajax() to make a POST call to web server which returns HTTP 201 response for successful creation of object at server. Since 201 is a success I expect the success function specified with jquery.ajax to execute but instead it executes the error function specified with jquery.ajax. Here is how I am using jquery.ajax call. request = '<user><name>SomeName</name></user>'; $.ajax({ error:function(request) { alert('Error creating user'); }, success:function(xml, textStatus) { alert('success');
[jQuery] How to append the new post?
Hi, How to append the new post to all the other users list. Like the way facebook.com doing. if I put a post it will update the my friends list automatically with out refreshing the browsers immediately. So could you please tell me how to do that? How to append the new post. Thank you, Ramanjaneyulu
[jQuery] TableFilter Issue
Hi Folks, i am using table filter. http://ideamill.synaptrixgroup.com/jquery/tablefilter/tabletest.htm i want to disable the Menu option...how to do this. Regards, Bharath
[jQuery] fire sharethis method after page loads completly
Hi All, I am facing a performance issue while using sharethis plugin. To enhance the performance I need to call sharethis method once the pageloads completely. How do I exceute a sharethis script after the page load or How to fire a ajax method when page load is completed. Any directions to solve this issue will be really helpful. Thanks in advance -Suresh
[jQuery] listnav letter question?
Great solution to managing large lists... 3 thumbs up! =) After playing with it this evening, I found myself wondering what it would take to possibly target another attribute to determine its placement? For instance if I were to use an image instead of a link or some other type of content without any text, how would I tweak the plugin to eval this area instead of its text. Do you believe this would be a simple endeavor? Before I really dig in, I thought I would first ask yourselves and see if this
Twitter $.ajax
Here's something I did with Twitter, PHP and the jQuery ajax function. It grabs the latest tweets for a given search term and keeps adding it to the page. Twitter Search with jQuery
[jQuery] Validation plugin - submit form without validation
I'm using the Validation plugin for JQuery and was wondering if there was a function to submit the form without causing it to validate the form. I have a table with a list of radio-buttons and above that is a drop down list of states. The drop down list of states is used to filter the table rows and when the selected item changes it posts-back to the server (via $("#frm").submit()). I don't want this to cause any validation to occur. Is there another function I can call besides submit(), or some
[jQuery] Scrolling between images in list item
Hi all, I have a few images and 2 anchors sitting in a list item. In the list item there's only one picture visible at a time and the 2 anchors are used to scroll back and forth trough the pictures in such a way that if the last image is reached the first one displays again and ofcourse the other way around. I've tried to figure out a way to achieve this with jQuery but not with success up til now. Here's what I have so far; $("li img:not(:first-child)").hide(); $("li a.next").click(function() {
[jQuery] Treeview plugin for navigation - solution
I just thought I'd post a solution I came up with that may be helpful to anyone using the treeview plugin for navigation. The problem I ran into was that the cookie persistence was working, but since I was using the tree for navigation to different directories of my site, sometimes the cookie wouldn't get set correctly and the state of the tree would end up being one step behind what the user had just clicked -- so the previously clicked node would be expanded rather than the current one. Thanks
[jQuery] Noob question about wrapped sets
Going through the tutorials on this website and others, I've found some syntax that I don't understand and is never explained. Usually wrapped sets look like this: $(#myElement) But once in a while they look like this $(#myElement)[0] Here are a few examples of it in use: $("div").index($("div#myDiv")[0]); $("#myImage")[0].alt; I don't get it. The sample code is NEVER trying to find the first element of an array. From my POV this format seems completely random and unnecessary, yet the jQuery code
[jQuery] Rename a file name
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=us-ascii" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 8.00.6001.18783"></HEAD> <BODY> <DIV><FONT size=2 face="Trebuchet MS"><SPAN class=519093823-20072009>I was wondering if someone could point out how to rename a file name.</SPAN></FONT></DIV> <DIV><FONT size=2 face="Trebuchet MS"><SPAN class=519093823-20072009></SPAN></FONT> </DIV> <DIV><FONT size=2 face="Trebuchet MS"><SPAN
[jQuery] Loading images into a div via scrollable plugin
I'm new to using jquery and am trying to learn a few tricks. I am currently using the scrollable jquery plugin to scroll some images of thumbnails in a gallery. What I'm trying to do now, is figure out how to load the large version of those thumbnails into a div when they are clicked. Here is a link to the webpage where the source can be viewed. http://www.tsutsumidaphoto.com/Mihoko/akiko2.php Any insight or resources that could point be to the right direction would be great. Thanks! -- View this
[jQuery] ajaxForm/Submit Window.Document
Using jQuery Form Plugin on a form that submits text & file fields to a remote server, the resulting XML/JSON returned does not appear to be available to jQuery. As demonstrated via error: function(XMLHttpRequest, textStatus, errorThrown) { console.log(errorThrown); Error: Permission denied for <http://XXXXX> to get property Window.document from <http://YYYYY>. I believe this is the DOM from the same domain issue. I can see the HTTP POST & Response in Firebug. How can I access the returned text?
[jQuery] Get the value of the option elements
Hello, The following code below doesn't seem to give the expected result: $('#aUsers option:selected').each(function() { console.log('user: ' + $(this).val()); }); It will display the empty string. -- View this message in context: http://www.nabble.com/Get-the-value-of-the-option-elements-tp24566521s27240p24566521.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Can't select checked checkboxes
I don't get it In my page I have several checkboxes like this one: <input id="item-8" type="checkbox"/> This is my Jquery code: function ShowSelected() { var ids; $("[id^='item-'][checked]").each(function(){ids = ids +"," +$ (this).attr("id").split('-')[1];}); alert(ids); } This should give me a list of ids,right? I get nothing, an empty alert can anyone help? Thanks
Set selectedindex in gridview with jQuery
In my gridview rowdatabound event, I've added a bit of code to set the selectedindex of my gridview as follows :- e.Row.Attributes.Add("onclick", ClientScript.GetPostBackEventReference(myGridView, "Select$" + e.Row.RowIndex.ToString())); it works fine except that I also have change events bound for each of my columns in the gridview and they won't fire because of the above. I want to move the above into my change event so that it would set the selected index for the gridview as well as do other stuff
[jQuery] tablesorter zebra issue in IE7/IE8
Hi everybody, I'm using the tablesorter plugin with the zebra widget and I've run into an issue with IE7/IE8. I'm setting a number of tablerow (tr) elements to invisible and then run a tablesorter update + appendCache action to make sure the zebra widget picks up on the changed structure of the table. This works fine in all browsers except IE8. With a bit of debugging I've pinpointed it with reasonable certainty to the appendCache function in tablesorter (actually appendToTable) but I can't find
[jQuery] thickbox + jquery help
hello i would like to customize a carrousel with thickbox by adding a description to each image but i m a bit lost, i would be VERY grateful to anyone helping me.... jQuery is 1.2.6 here is part of my code var mycarousel1_itemList = [ {url: "./images/deunan_evening_dress_s.jpg", title: "fff", description: "vvvv"},{url: "./images/lien_s.jpg", title: "titre de la sculpture", description: "qqqqqqqqq"},{url: "./images/briareos +dunan4_s.jpg", title: "autre titre", description: "qqqqqqqqq"},{url: "",
Next Page