help with dynamically changing div style
Hi, i'm new to jquery and am not real familiar with javascript. I have a color picker on my page that puts the hex value in an input box. I'm not familiar with jquery or javascript in general. I would like to be able to take the hex value and use it in updating a style of a div onkeyup or onchange...say the border color for example. Something like this...but this isn't working....have any ideas? <input type="text" id="colorfield1" onFocus="ddcolorposter. echocolor(this, 'colorbox1')"> <div id="colorbox1"
Missing something between 1.4.3 -> 1.4.4 update (.filter or selector or)
I must be missing some differences with my selector or filter with the recent version update. Previously (which still works with 1.4.3 ), i have stored my checkboxes in an html array: <input name="purpose[]" type="checkbox" value="val1" >val1 <input name="purpose[]" type="checkbox" value="val2" >val2 <input name="purpose[]" type="checkbox" value="val3" >val3 <input name="purpose[]" type="checkbox" value="val4" >val4 and i pass the results from the array to js through json_encode: (for instance just
How to post <form> with "live" and "$.post"
This form field for a PayPal transaction will be produced during a user session. Does anybody know how to automatically submit it with "live" and $.post? Thank you! <?php SCRIPT print "<form id=\"paynowForm\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\"> : <input type=\"hidden\" fooInputFields /> : <input id=\"paynow\" type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_paynow_SM.gif\" border=\"0\" name=\"submit\" alt=\"\" /> <img alt=\"\" border=\"0\" src=\"https://www.paypal.com/en_US/i/scr/pixel.gif\"
Events not fired when Iframe present on page
Hi, I am having problems with with event firing when an Iframe is present on the page. Once I remove the IFrame, everything works fine. Please note that the control has the focus when I press Enter key ( I read some articles that this might be the problem). I tried both in IE8 and Firefox. Here is my code: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" src="/script/jquery-1.4.3.min.js"></script> </head>
The problem about usage the of animate
I have a list for example <ul id="applications"> <li id="id-1" class="util"></li> <li id="id-1" class="app"></li> <li id="id-1" class="util"></li> <li id="id-1" class="app"></li> </ul>then I want a select some of the list with some animate effect, first the all of the elements would disappear, then the elements that I wanted would display one by one the code: $('#applications li').each(function (index) { setTimeout(function (e) { e.hide("slow");
Live Functions ??
Hi there, I'm working on a project where I need to execute a function on every select box in the webapp. So I created a jquery function lets call it 'myJqFunction'. I use it in the $(document).unload() and this is the code I use to call it $('select').myJqFunction(); . This all working fine in a normal website. The problem is that the webapp uses allot of json calls and jquery which loads content into the project at a later given time. In the later loaded select boxes the 'myJqFunction' wont be attached
ScrollTop moves to wrong div
So im basically using a link, to scroll through a series of divs to select the correct one. Ie click on happy, and scrolls to 'happy' div, However, the scroll seems to not go to what its linked to, but scrolls to the third div in the list. Heres the code: <div id="portfoliowrapper"> <div id="row1"><a id="kazooki" href="#">Kazooki</a></div> <div id="row1"><a id="UoD" href="#">Universe of Downhill</a></div> <div id="row1"><a id="kudia" href="#">Kudia</a></div> </div> <div id="description">
Writing Text Animation
Hi, i need an effect which writes me an text. Like i do it right now. It should look like someone is typing normal text. How can i do that thanks
jquery .get not doing an xhr request! on firefox
Hi,I have just entered the world of jquery and pretty new to javascript too.I have a small javascript snippet like below:- <script type="text/javascript"> $(function(){ $('a').click(function(event){ event.preventDefault(); $.get('/_add_navigation_',function(response){ $('#themaincontents').html(response); }) }) </script> The html looks like below:- <a href="?toaddnavigation">CLICK Me</a> <div id="themaincontents"></div> On the server side I do an xhr header
problems manipulating loaded DOM
Hello all. I have some problems when I try to manipulate a piece of HTML loaded by jQuery.load() function. Here is my code: var $popupCorreo= jQuery("<div id='mypopup'></div>"); //loading html code into mypopup $popupCorreo.load("mypopup_code.html"); //setting mypopup display:none $popupCorreo.hide(); //appending to body (mypopup has position:absolute and max z-index) jQuery("body").append($popupCorreo); //this button is in loaded code jQuery("#button_1").bind("click",
Menus appear/disappear on click
Hello, I've been looking all over the web and I can't find a solution. I am very new to jQuery as well. My case: I have a nav bar, each link in it activates/triggers a megamenu (each link has its own megamenu). What I need: I need a way to have each link activate its own megamenu, the megamenu should close when: 1. The user clicks on another item in the nav bar. 2. The user clicks on the same item in the nav bar. 3. The user clicks on a 'close button' (X) graphic inside the megamenu (not
Jquery featured Content Slider (CONFLICT) with Mega Menu
Hi everyone, I am quite new to jquery and like it so far, dipping my feet but getting them very wet! I wonder if someone with knowledge could steer me in the right direction regarding the conflict I have with my Mega Menu and my Content Slider at sample page, http://www.fisher-offshore-ltd.com/sample.html , as you can see the Mega Menu appears under the Content Slider,.... any whiz know how to sort this conflict? ideas appreciated. best regards Gino
Jumpy accordion
Hi my jquery accordion on http://tinyurl.com/35wc72x is acting a bit jumpy towards the end of the sliding animation of each answer, how can I fix that?
success message not displaying on form after submission
Hi, I am testing a form locally that uses PHP and MySQL to submit the info into a database and JQuery for styling, and message display. The form works, b/c I can see the data in the DB, but the success message does not appear. I just get the spinning circle, with no message. The code is as follows. [code] <form id="ContactForm" action=""> <p> <label>First Name</label> <input id="FirstName" name="FirstName" class="inplaceError" maxlength="120"
[solved] sorting div by class
Hey Guys, i`m having two kind of divs with different classes. Like: <div class="test class1">Class 1</div> <div class="test class1">Class 1</div> <div class="test class2">Class 2</div> <div class="test class2">Class 2</div> <div class="test class2">Class 2</div> So now I want to sort the two kinds in different parent divs: <div id="parent1"> <div class="test class1">Class 1</div> <div class="test class1">Class 1</div> </div> <div id="parent2"> <div class="test class2">Class 2</div>
Append parameter to url during ajax call with jQuery
Hallo, I need to append a parameter during an ajax call: I was thinking about something like below: function initTestAjaxAppendUrl() { jQuery(document).ajaxSend(function(evt, request, settings){ console.debug("Starting request at " + settings.url + " ") console.debug("Data " + settings.data + " "); settings.url = "http://www.cippa.lippa"; settings.data = settings.data + someCustomData; }); jQuery("#testAjaxAppendUrl").click(function(){
Listening for popup window load events across domains
I'm new to jQuery, so this may be a basic question... I have a page that's opening a popup window for an oAuth authentication request. The popup is a page in a different domain, and during the authentication process, the window goes through 3 page load events: [Login Page] \/ [Authorization Page] \/ [Response Page] In the opener window, I need to monitor those events to tell when the popup window has reached it's 3rd page load, extract parameters from the url, and then close the popup. Again,
set value of global variable by clicking event
Hi guys. I'm trying to build a digital program of an event. Basicly I have a list of items which show some inital information. The information is loaded from a xml-file. Every list item has an ID. The idea is whenever a list item is clicked its ID should be stored in the global variable. So I can access the ID on a detail page and load further information of that entry. The code I've come up so far is: var WIDGET = { container: "#programholder", container2: "#programholder2",
Help with .html() function
Hello guys, Can someone please tell me why and help me fix this example of the .html() jQuery function. What I am trying to do is execute a change in html inside a IE conditional statement. Here is my code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Replacing html with jQuery</title> <!--[if lt IE 9]> <script src="http://code.jquery.com/jquery-1.4.4.js"> $(document).ready(function () { $('nav#mainNavigation').html('<p>The HTML has been changed because your
Unassociate $ from JQuery
Hi all, Is it possible to unassociate the $ symbol with JQuery? As it is causing a conflict with another javascript framework. Thanks, Mark
.html() function not working in conditional comment
Hey guys, I was hoping someone here could help me get this simple exercise done. It invovles changing the html using jQuery when the browser is less than IE9 I was messing with the .html() jQuery function that I have used before and was having some problems, but I got help in this post With this code, it runs in all browsers: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Replacing html with jQuery</title> <script src="http://code.jquery.com/jquery-1.4.4.js"></script>
getJSON doesn't return any value/response!!!
Hi I'm using the getJSON to get the json value to be returned by a page, but there is no response from the function.. <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> alert ("dfdfad"); function sam() { alert("entere"); $.getJSON('https://test.httpapi.com/api/domains/available.json?', {'auth-userid':'234343', 'auth-password':'xxxxxxxx', 'domain-name':'testhiox',
Adding selected state to navigation with window location match
I know that others have asked about adding a class to a navigation based on window.location, but I couldn't quite fit my question within those bounds, so hopefully it's alright to ask here. Requirement Add a class based on window location Complexity The current if/else method I have doesn't work correctly, because all subsequent URLs will have the initial word we're looking for, and I'd like to have the final else to be on nav id#3 - (because the url's there will all be varied and may change later
JQuery with NetUI Beehive tag
dear all, I am creating a login page using netui beehive & instead of using javascripts, I am using jquery for this. since netui got their own tags like <netui:textBox ... tagId="myId" > how do i go around implementing jquery in this fashion like i usually do? i tried $("#myId").val() but fails. Am I doing it wrong or am I missing something here? Pls enlighten me .. Thanks
Having problem with animate({left}) in IE8
I've coded a scrolling bar that holds links to images. Anyway works great in FF, Chrome, Safari etc. In IE the element.animate({left: leftOffset}) call seems to lock up. The element I am calling animate on is hidden using .hide(). It appears using fadeIn() on a hover event. Does IE balk at animating hidden elements? Is there a fix? Thanks
image transition effect for multiple tabs
Hi, I had an requirement to do the image sliding effect. I got the sample file from google and implemented the same in my file. I need to navigate the images by clicking the next and previous button. I have four tabs each with some images. Each should show this transition effect. The problem I am facing with is that this code works only for my first tab. for rest of the tabs this transition is not working. Please suggest me some way so that I can navigate all the four tabs Thanks
foreach question
Hi, How can I select the value of the hidden input fields in each li? Sorry if this is a duplicate post, but I could not find the earlier entry. <ul id="headlineslist"> <li id="list849737" href="#headline_div_849737"> <div id="headline849737" itemid="849737" class="headline"> <div> <span class="flag"> <img src="/assets/1325.png"> </span> <h4>Iraq</h4><br /> <div class="datestyle">10 Nov 2010 12:50 GMT</div> <div class="headlinestyle">small title</div> </div>
IE checkbox doesn't uncheck
I have an issue that is specific to IE (testing in IE8). The following code unchecks checked checkboxes in FF, but will simply not work in IE : $j("input:checkbox[checked=true]").each(function() { $j(this).removeAttr("checked"); //$j(this).attr("checked",false); this doesn't work either //$j(this).attr("checked",""); this doesn't work either alert($j(this).attr("title") + " is "+$j(this).attr("checked")); }); In all cases the expected alerts are firing, and the alert says
jQuery 1.4.4 + meta characters in selectors = broken?
Until v1.4.4, I was able to use the following selector: jQuery("input[type=checkbox][name='entry[id=>assignedToUsers][]']") to select the following checkbox element: <input type="checkbox" name="entry[id=>assignedToUsers][]"> This was clearly in violation of jQuery's selector requirements, but it worked. I even tried encoding the > as >, but this introduces the ";" character into the selector. The jQuery Documentation has the following note: If you wish to use any of the meta-characters ( #;&,.+*~':"!^$[]()=>|/@
Can't open only one element with "dialog" function
Hello everyone and please forgive me in advance if I leave any details out as this is my first post here: I have a problem using dialog JQ command. More specifically, I want the button called "Edit" (line 7 below) to open only 1 window as opposed to all behind each other. Below is some of the code I use right now and a short description of what happens with the codde. Thank you in advance for reading! <!-- C# and HTML code here--> <table> <tbody> <% foreach (var item in Model) { %> <tr>
svg transparency feature detection
1. safari does not preserve transparency with SVGs in object, embed, or iframe tags 2. safari does preserve transparency with SVGs in image tags What I mean by "preserve transparency" is if the SVG with a red circle in an object tag is placed inside a div tag with a black background color, only the SVG will have a white background. The circle will be red but inside a white square inside a black div... I need to detect if the object tag is preserving transparency. If it does not preserve transparency
Need help with a slider
I have a practice site where I've been playing around with some jquery. Check it out here: pourite.com It functions ok and if you click a button, the image slides down as it should. How can I make it so that if the image is down already and you click another button, that respective image will slide down too instead of the previous one sliding up first Here's my script: $(function(){ $('#menu-container').hide(); $('#box1').hide(); $('#button1').click(function(){ $('#menu-container, #box1').slideToggle('medium');
Code Efficiency
Hey! Is there anyone who could help me make this code more efficient? $("a.more_info").toggle(function(){ var itemid = $(this).parent().parent().parent().parent().attr('id'); var itemid_hash = "#" + itemid + " .details_exp"; var itemid_tog_more = "#" + itemid + " a.more_info"; $(itemid_tog_more).addClass("less_info").removeClass("more_info"); $(itemid_hash).fadeIn(); }, function () { var itemid = $(this).parent().parent().parent().parent().attr('id'); var
How do I stop the blink??
The following code is meant to highlight the LI that the user is in within a form: $("input,textarea,select").focus(function () { $(this).parents("li").addClass("focus"); }); $("input,textarea,select").blur(function () { $(this).parents("li").removeClass("focus"); });So far this is fitting the needs, except that when I have multiple radio buttons within an LI it blinks each time I click on a different radio button. How do I fix this so that it can 'remember' if
how remove an element from an element
<li><input type="checkbox" name="test" />test</li> how can I remove the input field from the list? I want to end like this: <li><input type="checkbox" name="test" />test</li> I thought the following, but does not work: $('li').remove('input');
how to expand a collapsible fieldset when user hit tab button from keyboard?
Hi, By using this tutorial Stylish Collapsible Fieldset using CSS3 and JQuery, I have created asp.net web form with collapsible fieldsets. When this web page/form loads all the fieldsets at that time they are collapsed/closed but when user clicks on any legend the fieldset becomes expand/open. Now I want to add another feature that when user finishes entering data in the controls of first fieldset and he/she wants to move to the very next fieldset. Then he/she (currently in the last control (that
Doing some magic with JQuery
Hello all, I have this problem that I can't solve... I have two links. I want to show a text when none of them is hover, and then, when the mouse is over one of the links, fade out the current text and fade in the related one. The thing is, when doing it slowly and in order it works fine. But if you pass the mouse over both links quickly you can get the effect that both text are activated. I also tried the "if :animated then stop()" but I couldn't make it work. I have tried many things, unsuccessfully.
Help with .change (show a field on a <select> change)
First off, any help would be greatly appreciated. I'm sure some experts around here wouldn't have a problem at all! Below is the relative code: <select id="cash_or_check"> <option value="cash" SELECTED>Cash</option> <option value="check">Check</option> </select> <input type="text" id="check_number" name="check_number" size="10" /> $(document).ready(function(){ $('#check_number').hide(); }); $('#cash_or_check').change(function() { $('#check_number').show(); }); All I am attempting
AJAX to an array question
Im a fairly new user of jquery but have been doing php, mysql and basic javascript for a while. What im trying to accomplish is this: I have a site that processes vast amounts of financial data and then displays the results for the user. There are about 5000 items that need to processed in this way. I originally did it in a single php script which took foreever to execute and with no real indication to the user as to what was going on. So i decided to try processing each item individually by calling
Can call a jquery function on onclick() of <a> tag ?
Can i call a jquery function on onclick() function of <a> tag
Next Page