Group items with jQuery
Hello, I want to group every x objects with jQuery but I can't figure out how to do it. I have: <div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> And I want this: <div> <div> <div></div> <div></div> <div></div> <div></div> </div> <div> <div></div> <div></div> <div></div> <div></div>
Problem in IE with load
Hello, I am new the forums but not to jQuery. I have finally given up trying to find out why this keeps happening. The error is here http://apps.facebook.com/clickyclickgame/ BUT DONT CLICK IT YET!!!! What it does is redirect the frame one of the pages in load(). For example, it took me to index.php?page=ajax_get_top what it should be doing is loading the contents of that page into the div. It works perfect in Firefox and Google Chrome. My users have also reported that this error happens in Apple
Stopping Actions from happening?
Hi there, I have a text box where a user can press enter, tab (keypress) or click out of it (focusout) and an action happens. The box then gets removed. The problem is, the user presses enter, but that event is fired and then as the text box is removed the focus out is firing again. How do I prevent removing the text box from firing the focusout action? I can remove the action totally but the text box could be returned to the document later. So frustrating ! Jonathan.
hook all form submit button click events
how do I hook a button click event so that my handler fires first but does not affect the firing of other click handlers for the same button? What I want to do is hook all the form submit button click events. When a submit button is clicked, my handler will stuff some hidden fields into the form the button is contained within. Then the handler returns and the built in form submit button handler posts the form back to the server. thanks,
Loading Content Into The Same Div
Fairly new to the Jquery game and I must say it rocks. I am trying to load new contents of one page into the div of a current page. My test URL can be found here. http://www.tomtimms.com/developer. When the first url (contact) is clicked the contents are loaded into the div, however if you click on the next link (about) it takes you straight to the about page as the contents are not loaded . Can anyone assist on how I can make this happen? I think it has something to do with the dom already
Get ID of dynamically added HTML elements?
I am generating HTML based on user actions (in this case, populating a table with the result from AJAX calls). In my context, I have a link where there is a Quantity field, which I would like to be editable. When I create the html, I give a unique ID to each row, (to reference to a JSON object), however I am unable to get the ID for said row, seeing as the DOM tree is parsed on the pageload and doesn't seem to update when I add elements to the page. This means that $(this).parent('tr').attr('id')
Load precompiled list with js code
Hi there! Please forgive me if the answer for my question already exist on this forum (I tried to look for it but with no luck). I have a huge list(around 75000) of <ul> and <li> elements. The code for creating menu from it requires to pass through each ul element and its children. It adds data( using .data()) and css properties. After processing menu works fine, but loading such huge list and passing through it takes alot of time(especially in IE and Opera). Są i thought I would put this menu in
Handle non existant array element
I have the following array var arraydata={NOT1NO:{ field1: 'NOT1NO', field2: 'DURcy', field3: 'valuta', field4: 'INF'},NOT2NO:{ field1: 'NOT2NO', field2: 'DURcy', field3: 'valuta', field4: 'INF'}}; I easily access parts of the array like arraydata.NOT1NO.field1. But if for some reason I try to access a part of the array that does not exist, like arraydata.NOT1NO.field22, the whole script stops to function. Is there a way to handle this? For instance: if (arraydata.NOT1NO.field22 DOESNT EXIST) {do
Preload an iframe with errorhandler
Hello guys ... I'm looking for a function which loads an iframe in the background. When the iframe is loaded the preload-image should be hidden (look at the function below). But if the iframe-content can not be load (error 404, 500, ...) an error message should appear instead of the iframe. This is my function: jQuery("#fzgsuche-iFrame").ready(function() { jQuery("#fzgsuche-iFrame").css('display', 'block'); jQuery("#fzgsuche-iFrame-PreloadImg").css('display', 'none'); });Is it possible
Wrong approach of the toggleClass
I have moved my post from "starting' to "using" to see if I have more luck here. Any suggestion, idea, will be appreciated. If my question it's not clear, you can copy the code and try it next to a Jquery. You'll see that sometimes there is some classes that aren't toggled to their initial state. Anyway, thanks again. Follows the first post. And sorry to insist, but I can't really figure out what I'm doing bad. Hello; I'm trying to learn JQuery (I'm not a programmer). I did a menu that works but
getting the value from button in IE6/7
Hi again! Wise people, please help me again :-) So, i have html code: <button name="amount" value="1">a</button> and i want take a value from it a put it in the text input. I tried in two ways: $('[name=amount]').click(function() { $('input:text').val($(this).val()); }); and this: $('button[name=amount]').click(function () { var text = $(this).attr('value'); $('input[type=text]').val(text); });and always in Internet Explorer 6 and 7 exept value "1" i got "a". Is there any other
Slideshow implementation with image-stretch
Šime helped me solve any issue with image stretching proportionally when the browser is resized: http://vidasp.net/tinydemos/image-stretch.html I can't seem to solve the slideshow portion of this implementation. The slideshow will feature both jpgs and flash movies. I'd only like the jpgs to resize, while the videos will stay fixed. Simple fade or even hard transition between work. Any help would be appreciated.
about <object> event binding
The html code: <html> <body> <div> <object data="a.php" ... > <param name="type" value="value"> .... <embed ... > </object> </div> </body> </html>I want to bind a user event to the <object> node using the following code: $("object").bind("userevent",function(){ alert("user event");}); Somewhere I generate an event: var e = document.createEvent("Event"); e.initEvent("userevent",true,true); $("object")[0].dispatchEvent(e);
Multiple functions with jQuery
Seems that only one works at a time, each one when called (button press on page) individually (blank out all other functions) works and if I leave them unblanked only the last function works.. How can I get them all to display their data instead of just one of them? Each function is like this, draws data from a MySQL database: function loadFuntion_x() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5
Add/Remove Boxes Help Requested
I am brand new to jQuery and I am sure that this is a simple, nuts-and-bolts mistake. I apologize in advance for taking people's time but I have been looking at this for about 14 hours and I think it's time to ask for help. I have a web page with two <div>s on it and I wrote jQuery code that adds another, similar <div> when an "add" button is clicked elsewhere on the page. That works fine (including stopping and delivering an error message once a total of 6 of these <divs> are on the site.) The
how to make an unfinished loop
hello, i am a beginner with jquery and im wondering how i can make an unfinished loop? i have some code written and i how can i make a loop which is running all the time since document ready. for example i would change a background color for #block or slideUp this element. this would be also perfect if i could delay this actions and stop the loop on mouseover but this are the question for the future :) that is my code: $(function() { $(document).ready(function(){ $('#block').delay(5000).slideUp('slow');
Jquery textbox array
Hi guys! I am new a jquery and I've got two questen. I want to send a post request by clicking a hyperlink, but my problem is I want to get data from a array of text fields and i don't know the accesskey for the object i need. Are I'm able to do this? Please can you help me? And my second Problem is i want to click a hyperlink and then show a textbox instead of a label with the same values but this is all in a table and so i also don't know the accesskey. please help me. thanks Dalamos
jquery value in jstl variable
<c:set var="destCount" value=" "/> - value should be set by jquery....is it possible?
help can't hide an object
Hi, I'm trying to hide an object if the dropdown did not select the first object, but it won't work where did I do wrong? This is my code: if $('select option:first)') .is('not(:selected)') { $('.attachment').hide(); } Thanks!
problem in passing a variable to a function
hi sorry if this is such a obvious question, but i'm kind of newbie in JQuery, i am using a lightpop plugin, & i want to pass 'image_path' via html. lightpop plugin code is something like this: (function(jQuery){ jQuery.browser = jQuery.extend( {chrome: /chrome/i.test(navigator.userAgent)} , jQuery.browser ); jQuery.fn.lightpop = function(settings, fileTypes, plugin_name, image_path, pre_image, pre_icon){ document._write = document.write; plugin_name =
ignore queuing in mouseover/mouseout
hi how can ignore queuing in mouseover/mouseout in such codes like this: <html> <head> <title></title> </head> <SCRIPT language="Javascript" type="text/javascript" src="jquery.js"></SCRIPT> <script type="text/javascript"> $(document).ready( function() { $(".content1").mouseover( function() { $(this).fadeTo("slow", 0.6); }); $(".content1").mouseout( function() { $(this).fadeTo("slow", 1); }); }) </script> <body> <div class='content1' style="background-color:#666;
JQuery HTML Editor issue
The blow script is used to hide and display an Html Editor. var editor = $('#hider').children().detach(); $('#hider').prepend(editor); It seems browsers (FireFox, Safari, Chrome) recreate all iframe objects after inserting a part of the page hierarchy back into the DOM. The main iframe is created without the content (or with the "false" text string taken from the iframe's src attribute), and our event handlers become undefined. After that, the control stops working completely. However, in IE, the
Toggle - Horizontal accordion issue
I have a horizontal slider I am working on, I have it sliding properly sequentially but I don't have it sliding correctly when its not. Here is a brief explanation of what I am trying to find, if you click the third element and then after click the second you should see the third move back to its state with the second. here is my jquery I am using: $(document).ready(function(){ var masterCount = $('.sheets-gallery ul li').size(); $(".sheets-gallery ul li").each(function(idx, item) { var itemNum
getJSON not work in Chrome
Why jQuery.getJSON() not work in Chrome 5.0? but work in IE8. This my example: <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.min.js"></script> <script> $(document).ready(function () { $.getJSON("http://exy.com.ua/q/index.php", "", function(data) { alert ("b = " + data.a); } ); }); </script> </head> <body> </body> </html>
jquery click-events after postback don't work anymore
Hi there, I built a small website which has a confirmButton on it. When you click the confirmButton a dialog will appear which asks you to confirm or to cancel. The problem is that after you click 'Yes' on the dialog (executes postback) the jquery-click-event on the confirmButton doesn't work anymore. Below you can see my whole website. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConfirmDialogTest.aspx.cs" Inherits="NeuesBerufsbildungsWeb._Global.WebControl.ConfirmDialogTest" %> <%@
selector union
What is the best way to get the union of two selectors? For example, say I want all the elements that have the class "foo" and all the elements that have the class "bar". I found this: $('.foo').add('.bar') Is that the only way?
access data in array with this
I have the following array: var arraydata={INPUTID:{ field1: 'field1',field2: 'field2',field3: 'field3',field4: 'field4'}}; Normal way to access data such as arraydata.INPUTID.field1 is no problem My problem arises when trying to access data when iterating over input fields in a form. Such as: $("input").each(function() { data=arraydata.THISID.field1'; THISID is of course the id of the actual input which corresponds to the INPUTID of the data. Can't find a solution, what should stand instead of THISID
Accessing an iframe which do not have an ID?
Hello, an external javascript file inserts this HTML code via "document.write": Now I want to hide this iframe at onload, e.g.: $(function() { $(???).hide(); });But how can I access this iFrame which do not have an ID? Thanks. Carlos
Calling REST Webservice with credentials
Hi, I wanna create an application that calls a REST service. The service only provides information depening on the user calling the service. For example http://xy/address/234 The address with ID 234 is only allowed to be requested if the user is authorized for. My question is, how I realize this with jquery. I am not sure how to design the authorization of the REST service to work pretty well with jquery. The credentials should not be entered on every call. So, the credentials should be saved using
How can i make the size of superfish sub menu to 90% of the window?
I want use superfish menu but i can't change the width of the sub menu to 90% from the size of the window can you help me how to do this. Thanks to all
I need help about Superfish menu
Can somone help me how can i make sub menu of superfish with maximum width (for example 90% of the width of the window) Thanks
Please give me an example for each one!!
The probles are prependTo(*****) wrap(<***></***>) I have no idea about the concept of each lines. Please give me an example.Please. Thanks.
Toggling of iFrame working fine in Firefox but not in IE
I have different iFrames on my page and one of the iFrame has pdf plugin that shows the PDF document and i have another iFrame that pops up on delete button click and a function to toggle the iFrames. It works fine in Firefox but in IE my pop up iFrame is always behind the PDF. Any thought how can I set it right, there is some issue with the z-index of PDF, it is set to infinity something like that in IE ! Thanks.
ajax requests
Hello guys, I am having a problem with ajax requests. They are working fine on firefox, but the are bugged on IE and Chrome =/ I have a page (page1) that makes an .ajax request for page2. page2 has some javascript. When I load page2 on firefox, it handles all the <script> tags correctly and I can call on page1 any function that is declared on page2. But on Chrome and IE, they dont handle the <scripts>, so if I need to use any function declared on page2, I also have to have it declared on page1, which
Image caption & Jquey Vgrid
Hi, I'm trying to make a page with thumbs (including image captions) in combination with the Jquery Vgrid system. For the Image captions I found this information: http://web.enavu.com/tutorials/making-image-captions-using-jquery/ And for the Vgrid: http://blog.xlune.com/2009/09/vgrid/demo006.html http://jquerystyle.com/2010/03/25/vgrid I've already a html, based on the tutorial 'Making image captions using jQuery', but I don't know how to make a combination with the Jquery Vgrid. Does anyone have
Custom attribute in serialized array
Is it possible to store other attributes than id and value of an input to a serialized array? Example: html field: <input type="text" name="NOT1NO" id="NOT1NO" value="1" custom="test" /> Using serializeArray creates array like [ { name: NOT1NO value: 1 }, Is it possible to include for instance the type attribute and custom attribute? Example: [ { name: a value: 1 type:text custom:test },
Fade background image to new one
I have 3 thumbs, and when I click on one of the thumb, the background of my site has to fade to the same image as the thumb. This code is working for me, but it is fading to white first, and after it fades to the new background. function changeback(backname){ var newsrc = "<?=SITE_WEBDIR?>img/bg/"+backname; $('#backimg').fadeOut(300, function(){ $(this).attr('src',newsrc).bind('onreadystatechange load', function(){ if (this.complete) $(this).fadeIn(300);
Pagination problem in jqgrid with array data.
Hi All, I am facing problem with pagination in jqgrid with array data having 18 records, but the records are not displaying in pages even I specified pagination:true,pager:jQuery('#pager1'). Can you please help me to implement pagination instead of scrolling. Please find the code below : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;
No click-event after postback anymore (ASP.NET)
Hello there, I want to create a ConfirmDialog which displays by clicking on a button (postbackButton). The Dialog has two Buttons (cancelButton and continueConfirmation). User actions: 1. By clicking on the postbackButton the dialog appears and the postback will be cancelled. 2. a) By clicking on the cancelButton, the dialog disappears. b) By clicking on the continueButton the postbackButton will be triggered. Below you can see my jquery script inside of the function 'loadConfirmDialog'.
help with .next() or similar
I have an unusual situation. I need to increase the font size of every word in a sentence, one at a time, everytime you click on the page / div. any ideas ? my closest idea was to wrap each word in a <span> tag and then use .next("span"), but that controls all of spans. If i had <span>word one</span> <span>word 2</span>, how would i style one span at a time by clicking a single button ?
Next Page