Slide down and slide up with one link
Hi, I'm really new to Javascript and jquery and I'm actually writing my first script. It's for a navigation on my website. I want to have the sub-categories sliding down, if you click on a parent-category. I made it and there's no problem. But I want the sub-categories to slide away with a second click on the parent-category and I don't know how to do this. to give you an example of my code: the html: <ul> <li><a href="#">Home</a></li> <li class="menuparent"><a class="menuparent2" href="#">Info</a>
plugin that shows/hides text so that it fits in element
i have a resizable box with text in it. i was wondering whether there is a way so that if not all the text fits in that box, i can just show the beginning of it followed by "..." and as the user increases/decreases the size of the box, more/less of the text automatically appears. is there some plugin that can do this for me? if not, any ideas on how i can achieve do this in a straightforward way? thanks in advance!
[jQuery] [validate] plugin does not validate form at all...
Hi All, I am trying to use the validate plugin to validate a form but it does not work..Could you please let me know what i am doing wrong? The page starts with a simple drop down asking for the user to choose a category. Once the category is chosen, a div block becomes visibile. WHen the user clicks submits the form, I would like to validate the form only for the visible elements. Since I was trying to figure out how to use the validate plugin i was just calling the plain .validate() call without
[jQuery] Safari AJAX problem
Hi I have issues with Safari that AJAX page disappears after load and also C# page methods does not load. BUT if i choose from the Safari menu: Develop - User Agent - <any other windows client (Firerox or IE)> then it works Ok!!! My question - can I control this from Javascript - i mean to change this settings in the client browser or any other solution.... thanks Alex
[jQuery] I need the solution for my edit in the place
The below code which display the username from the user table,<div> </div><div>When i click the username , then that particular user firstname will be display , </div><div> </div><div> </div><div>Now i want to edit that particular person firstname ,</div> <div> </div><div>How to do that with jquery ,</div><div> </div><div><div> </div><div><div><html></div><div><title>Jofire Contacts</title></div><div><head></div><div><style type="text/css"></div> <div>li{</div><div>list-style:none;</div><div>color:#0033FF;</div><div>cursor:pointer;</div><div>}</div><div></style></div><div><script
[jQuery] help with an IE bug: "marginTop"
jquery1.3.2, 1.3.1, 1.2.6 IE 6, 7, 8 I have some code for a nested select list that opens child list when an anchor is clicked on, then retrieves some content through an ajax call. In between that, I'm displaying my "loading" image, which is done using a showIndicator() function. That, in turn, makes use of Alexandre Magno's jquery.center plugin.[1] IE is choking on it, though. The error is "Invalid argument" and points to line 1061. That bit of code is right at the end of attr: if ( set ) elem[
[jQuery] jcarousel and text below image
Hi, I am playing with jcarousel and trying to show text below my images. Like for example the reference nr or name of the image. I am showing images of properties from my database and allow the user to scroll through the properties. If they like one, they can click on it and it will then show a page with more details on it. I have tried to add text but it seems to show only one character that I can see because it is behine the next image. I have then tried to use the <BR> tagg but this does not move
[jQuery] Simple .post won't work
Hello. Jquery noob, but lovin it. Can't get a rudimentary post to work, but probably missing something very simple. Alerts are working, but div content is never updated. Following in file called "select.php": -------------------------------------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:// www.w3.org/TR/html4/loose.dtd"> <html> <head> <?php if(isset($_POST['color'])) { $color = $_POST['color']; } else { $color = 'black'; } ?> <script src="http://code.jquery.com/jquery-latest.js"></script>
[jQuery] CSS Style Property Assigned by Class
For some reason I cannot get jQuery.css('name') to return a style property that was assigned by a class. However, it returns the property if it was assigned by style="". Has anyone else run into this issue? Bug? Here is my test code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/ TR/html4/strict.dtd"> <html><head> <title>CSS Test</title> <style type="text/css"> .apply-border { border: 1px solid blue; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/ jquery.min.js"
[jQuery] Modifying element on drop into sortable list
Hi everyone, I've got a Draggable list working in conjunction with a Sortable list. When I drag an item from the draggable to the sortable list I want to modify the contents of the list. The code I'm using right now is: $("#list li").draggable({ connectToSortable: "#page ol", containment: "window", helper: "clone", revert: true, revertDuration: 0, appendTo: "body" }); $("#page ol").sortable({ handle: ".drag_handle", receive: function(event, ui) { $(ui.item).css('background','red'); } }); Instead
Change attributes of html loaded from a remote page?
On the main page of a site I have this code $("#blog").load("blog #content"); which pretty obviously loads the last few entries of a blog into a div on the current page. Then I have this code $("h2 a").attr('href', $("h2 a").attr('href').replace("blog/", "post.php")); which parses all links within h2 tags and changes an address such as 'mysite.com/blog/?id=112' to 'mysite.com/post.php?id=112' so basically all that is supposed load some posts from a remote [wordpress] blog into a div, and then replace
[jQuery] limiting many form input fields with global limit
Hi Could Anyone help me with this? I have a form witch contains e.g.: X input fields like this: <form> <input type=text name=info0> <input type=text name=info1> <input type=text name=info2> <textarea name=info3> </form> And I need limit the global number of characters that are written to this form. E.g.: The global is set to 100 chars, and if user inputs 10 characters to <input[name=info0]> then he/she can use only 90 characters to fill in rest of the inputs. Then if user inputs 30 characters into
Could be JCarousel? Could be Accordion? Could be resizing?
I seem to have an issue with a JCarousel/JAccordion combination. The URL is: http://www.icandyclub.co.uk/content.php ... f8c724.jpg When you open that page everything is fine; the tester content in the accordian menu is populated with a carousel and displays fine, as do all the other sections of the accordion menu (Latest Content and New Members) and swapping bewteen them is also fine. Good so far. However, if you click on any of the pictures in Tester's Content the image will display, but swapping
re[jQuery] moveAttr('href') on document load?
$(function() { $('#add a').removeAttr('href'); }); What's wrong with this code? I want to remove all href's from a tags onload of a document. Still a bit new to jQuery so sorry for this silly question! Just been trying to figure it out for ages. The links are in a div with id add. Thanks for all the help! Sam -- View this message in context: http://www.nabble.com/removeAttr%28%27href%27%29-on-document-load--tp23355653s27240p23355653.html Sent from the jQuery General Discussion mailing
[jQuery] Flexbox json_encode ??
I have a strange problem, I'm trying to use Flexbox. I can use the JSON array when I output the array to a file and call it from within the html, but when I try to go direct to the file it won't work. I'm guessing my problem is with the json_array. I run json_generator.php > json.txt Flexbox: <script type="text/javascript"> $(document).ready(function() { $('#fb').flexbox('json.txt') }); It works, but when I use: <script type="text/javascript"> $(document).ready(function() { $('#fb').flexbox('json_generator.php')
[jQuery] Why JQuery Autocomplete displays only one item?
Am using JQuery Autocomplete on my templete, but as i get the results the Autocomplete only displays one item despite that the results that are fetched have more that one item. It only shows the first item on the list! Example: if i have a result list with ('python', 'pythonism', 'pythodus') and on the autocomplete i type 'pyt' it only displays 'python' on the drop down! My autocomplete code: $(document).ready(function(){ $("#tags1").autocomplete("/taglookup/", { width: 320 }); }) My Ajax
Draggable/sortable, changing newly created elements
Hi everyone, I'm using Draggable and Sortable in conjunction with one another. I'm having a bit of trouble with the receive event function with my sortable list. My code is as follows: $("#list li").draggable({ connectToSortable: "#page ol", containment: "window", helper: "clone", revert: true, revertDuration: 0, appendTo: "body" }); $("#page ol").sortable({ handle: ".drag_handle", receive: function(event, ui) { $(ui.item).css('background','red'); } }); What I was
Stop Ajax Calls
Hi everyone, I'wondering if it was possible to stop every current Ajax calls in the page. Thanks in advance !
Submitting UI Dialog with a particular submit button
I currently open UI dialog using the following function. jQuery("#Delete").click(function() { jQuery("#dialog").dialog("open"); return false; }); My buttons definition for UI dialog buttons: { 'Delete': function() { jQuery("#form")[0].submit(); jQuery(this).dialog('close'); }, Cancel: function() { jQuery(this).dialog('close');
[jQuery] Minimum amount of checkbox selected validation
Hello, Trying to use jquery to validate that a minimum of 7 check boxes are selected. the code is as follows: $(document).ready(function() { $("form").submit(function() { if (!isCheckedById("AreasOfInterest[]")) { alert ("Please select at least 7 items"); return false; } else { return true; //submit the form } }); function isCheckedById(id) { var checked = $("input[@id="+id+"]:checked").length;
jEditable - WYSIWIG combination || problem
Hi, Experiencing a little problem using the WYSIWYG inline editor with the jEditable plugin. I have succesfully installed it and got it actually to work. But here’s the thing: Once I specify options/controls for the wysiwyg editor, these are only being applied to the first ‘editable’ area I activate. Once I click/activate a second or third ‘editable’ area they display the wysiwyg editor with default settings. Here’s some code: $('.postContent') .editable('editdatabase.php',
[jQuery] file upload with JSON type
Please note here http://malsup.com/jquery/form/#code-samples in section File Upload that Response Content-Type header MUST be text/html ( at least in FF ) for correct handling <textarea>JSON_ENCODED_RESPONSE</textarea>
[jQuery] How to remove 'null' or replace it with "" for the returned data?
$.getJSON('/MailDatQueryJsonAction', {mailDatHeaderID:maildatheaderid},function(data){ $('#historyJobID').attr("value",data.historyJobID); } In jquery-1.2.1.js, when data.historyJobID is empty,it will return "",correct!! But in jquery-1.3.2.min.js, it returns "null". Who can help me resolve this problem?
[jQuery] thickbox like in front page of Jquery website
Hello everybody, I search the little script used in the front page of JQwebsite. The litte scritp that make appear little box on rollover "Lightweight Footprint, CSS3 compliant...". the class is jq.thickbox but i can't find the script. I know is a very simple script but i really want to know about. Thanks in advance for your answer Sébastien
$validator.methods null or not an object
Hi, i'm trying to use jquery for the first time. i'm using the jquery validation plugin from this site: http://bassistance.de/jquery-plugins/jq ... alidation/ at first instance its working fine, ie, when i test the first textbox validation, it works perfectly throwing the required error, but when i go to the second textbox and test it, it doesn't work and throws this javascript error: Line: 472 Char: 6 Error: '$.validator.methods[...]' is null or not an object Code: 0 i went through the validate.js
animate() using variables
Is it possible to use animate() using variables? My code is sound but when I try to replace the CSS value with a variable, it suddenly won't work in IE7. //First, here's the code that works in all 3 browsers: FF, Chrome, and IE7 $('#btn').click(function(){ //no problem here $('#otherdiv').animate({height:200}, 'slow'); }); //This is where it begins //Won't work in IE7 when using a variable $('#btn').click(function(){ //uh, oh var i = $('#mydiv').css('height');
How "div" and $ slideToggle. Post
Hi guys I have a huge problem with jQuery can not solve. So I'm trying to do this, I have a list of authors, an author by clicking on the recall data using db connection, and of course just below should open the div with the SlideToggle, with the results in the db already formed. but since when I connect to mysql everything is ok .. The problem arises when I print the result. or have to press twice the author to display the text (open, close and reopen). Then I thought to put the word "loading" when
Need help with a piece of code
My knowledge about jQuery is limited so i need some help, i want to use a slide up box in a image(this box contains a couple of thumbnails for every image). My problem is everytime i add a new images is have to ad a new class. jQuery.fn.overl = function(classe) { $(this).hover(function(){ $(this).find(classe).stop().animate({height:'70px',opacity: '0.9'},400); },function () { $(this).find(classe).stop().animate({height:'0',opacity: '0'}, 400); }); }
[jQuery] Binding hrefs in table entries
Hi, I'm quite new to jQuery and have a question. I'm populating a table with rows where some of the columns include links and buttons. For some of these links and buttons I want to run some jQuery stuff before it's redirected (acually, I want to have the result loaded in a div via ajax). In the jQuery function I want to be able to extract the ID of the button or the href target that was clicked. Now, the problem I'm having is that each of the rows in the table will generate a different ID for the
[jQuery] Why JQuery Autocomplete displays only one item?
Am using JQuery Autocomplete on my django templete, but as i get the results the Autocomplete only displays one item despite that the results that are fetched have more that one item. It only shows the first item on the list! Example: if i have a result list with ('python', 'pythonism', 'pythodus') and on the autocomplete i type 'pyt' it only displays 'python' on the drop down! My autocomplete code: $(document).ready(function(){ $("#tags1").autocomplete("/taglookup/", { width: 320 }); })
[jQuery] Implementing Thickbox within ajax style Jquery-ui-tabs
Hey guys! I have some ajax tabs using the jquery-ui-tabs features. Within these tabs are tables with links. There are name links I am trying to load with an ajax style thickbox modal window. Then linked within tabs, the thickbox will not initialize. When a static page with no tabs, the same code fires off the thickbox perfectly fine. Any guidance here in solving the issue.
[jQuery] [Form submittion not working]>>any error in the code..... please check
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#993399"> <font size="-1"><font face="Calibri">$(document).ready( funtion(){ return false; $("#send").click( function(){ $.post("lib/ajax/requests.php", { action: "postrecommendmypros", projectname: {ALL_SEARCH_TXT},
[jQuery] textarea with line number
Hi all. I am noob in Jquery. Help pls. How to make textarea with line number ? Here is my code: <script type="text/javascript"> function f1() { var lines = $('#txt').val().split('\n'); var line_number_size = $('#line_number li').size()+1; var max = lines.length; if(max >= line_number_size) { $('<li>' + line_number_size + '</li>').appendTo ('ul#line_number'); line_number_size++; } else { $('li:last').remove(); line_number_size--; } } </script> <ul id="line_number"> <li>1</li> <li>2</li> <li>3</li>
[jQuery] Form to HTML Possible
Hello Everyone, I wanted to know if there was a plugin that would allow users to enter form fields and have that input populate table cell information on a separate page. I need this to be flat file based without a server side language like php/.net. I've seen javascript page editors but I need to restrict the input and have it the results formatted in a specific way. Thanks, Zoren
get the id of element given a coordinate on the page
is there a way to get an element id that contains a particular point (x,y)?
[jQuery] Incorporating SVG Roundies Via jQuery
QUESTION: What is the best way to incorporate SVG Roundies into a jQuery controlled webpage? BACKGROUND: Before I began using jQuery the following block of code was included in a <script> tag in the <head> tag of a Dreamweaver template. I have since moved it to an external JavaScript document that includes the jQuery ready() function and various other jQuery methods that I have created using JavaScript. The code in question resides in this document completely independent of any other Javascript or
[jQuery] Disable user input to a div
Hi, I have a page with a few divs. One of the divs contains several anchors, text boxes, and list boxes. Under certain error conditions, I need to disable all the anchors, text boxes, and list boxes inside that div (but other divs on that page should not be disabled). What is the easiest way of doing it? Thank you.
[jQuery] Cannot make function run on "load" event
Hi, i use jQuery 1.3 and would like to make the following code run as soon as the elements i am targeting have loaded (or as soon as the page has finished loading). At the moment, I can only get it to fire on an event related to the target (in code below i'm using "hover"). Ihave put this snippet of code inside the document .ready handler, which is where I assume i should put it (?): $('div.expandCollapse').hover(function() { $(this).parent().css("height","auto"); var fullHeight
[jQuery] ready function mystery
This page: http://reenie.org/jquery/ is linked to 1.js which has this code: $(document).ready(function(){ $('#myForm').livequery(function(){ alert('why is this happening?'); return false; }); }); When the page is first loaded, it triggers the alert. It doesn't seem like it would because it is in the livequery function. Why does it do that?
[jQuery] Black border on jQuery animations in IE 6-8
I taught it to myself without even having any true JavaScript experience and am sure that while functional, many of my implementations could/should be written completely differently. I'm running some animations that look great in everything except for IE. In IE I'm seeing a thin, ragged black border around some of the elements that I'm animating. Does anyone know why this would happen?
Next Page