iframes, parent and child documents
Hello: I'm putting some finishing touches on my website. One is to insert links from one part of the page/site to another part. For example: At this point I'm trying to get a button on a parent document to add and remove classes of an element in a child iframe. I've successfully moved focus to the iframe, but can not change classes of the child element. Following is my syntax: $('.ref_bttn').click(function() { $('#client_content').hide(); $('#ref_content').show();
Beginner who has general questions about using AJAX in a control panel
Hi, I am looking to update information in real time on my backend panel through my website. My designer has been telling me integrating AJAX is very expensive task to do and implement on the backend of the site. I am looking for AJAX like updates to take control at certain points during a process. All i would need it to do is update my database and show the change on the front end of the website. For example, when a customer rates a provider I would like the rating to automatically occur without
Looking for floor map
Hi, I came across this Flash based floor map http://www.southlakeregional.org/SL_Wayfinder_ThisOne.swf. I was wondering if there is a jQuery plugin that would do this kind of map. Thanks in advance. Joe Green
callback for final iteration of .each
I am using .each to iterate over an object and add elements to my page that corresponding to each property in my iterated object. Once I have added all the elements to my page, I want to do something like - $('.addedElements').draggable(); Unfortunately, .each does not allow me to provide a callback to execute after the final iteration. One suggestion in the comments of the .each help page was to check indexInArray against collection.length. But, of course, indexInArray isn't really an index if
bind a function to all "select" that runs on change
Hi guys, I hope someone can help me out here... I'm pretty new to jQuery and am trying to attach a function to the change event on all the selects on a window, but I don't really get how to do it. This is what I have thus far: $("select").each($(this).change( function(){ alert($(this).val()); } ));
query not refreshing data
hi i have setup a rest service that is exposing some data via get. i can consume the service with jquery and show it on a html page. my problem is the data does not refresh. to get the current data i have to close all browser tabs and reopen. scenario : 1 - wcf exposes a 3 records 2 - jquery html client web page consumes the service and shows the 3 records , working on workstation 1 3 - add one extra record from workstation 2 4 - on workstation 1 if i refresh nothing happens.....i have to
Simplest slider - Ever! (That dosn'tt work properly)
I have been playing about with Snook's code. I liked it because it was really simple, and my coding skills are very basic. I have modified the effect and how it is triggered. The setInterval is triggering off the image rotation, Then the frwrds div/button is jumping in to trigger the next image. What I would like to do is, when frwrds button is clicked, I would like the setInterval to pause for a couple of seconds. Dose anybody have any ideas how do do this a simple as pos? My code-age:
setInterval - backgroundPosition
Hi, can anybody please tell me why my background is not shifting on a loop? It only seems to shift 200px and then stop. #image_box_03{ position:relative; width: 200px; height:200px; margin: 0 auto; background-repeat:repeat-y; border: thin solid #000; background-image: url(images/number%20sprites.png); background-position: left top; } <script type="text/javascript"> setInterval(function(){ $('#image_box_03').animate( {backgroundPosition:"(-200px 0px)"},{}); }, 1500); </script> Thanks for any help.
Get a td's title attribute.
Hi, I have a table that has many cells. Each cell has different title attribute. My original code was to get the text of a cell. How to modify it to get the cell's title attribute? var showTooltip = function(event) { var authorName = $(this).text(); $tooltip .text('Highlight all articles by ' + authorName) .show(); positionTooltip(event); }; Thanks.
jQuery malsup Form Plugin Ie 7 failing
Hi I'm Using the plugin from http://malsup.com/jquery/form, which works fantastically in FF and Chrome but is throwing errors in IE 7 which is a pain as most of the users will be using I.E. I am using * jQuery Form Plugin * version: 3.09 (16-APR-2012) I have tried both jQuery 1.4.2.min.js ans 1.7.2.min.js libraries I have switched on IE debugging and it is reporting: Runtime error Line: 121 function expected this is the line the debugger is highlighting: // give pre-submit callback an opportunity
dynamic table row creating and ajax
I am new to jquery. Can someone please help me ? I have a table, and a select box. On change of the selection, I need to dynamically render a new row containing response from an ajax call. So essentially I need to create a new row and to load html into the new row. Here is the html <table id="myDiv"><tbody><tr>....</tr></tbody></table> js finction jQuery("#myDiv).closest("tr").after('<tr id="myDivv" />') ; jQuery("#myDivv").load(url, settings) ; I dont see the new row being added. However
Help with .click(function () and HREFs
I am trying to have a .click on any <a> tag inside my <div id="test">. If they are inside a <li>, they do not work. Code... $("#test a").click(function () {.... // Function to open in iFrame new_window($(this).parent().attr("id"), $(this).attr("href"), null); If I use without <ul><li> it works... <div id="test"> <a href="index.cfm?action=statusTracking.statTrkLSDconvert" onclick="return false;">test link</a> </div> Adding UL and LI does not work. It hits the function, but then just refreshes
wrapAll two siblings - How?
Hello, I want to wrap two html elements with a <div>. I want only the <img> that has a next sibling '<div class="last">' and '<div class="last">' that has the previous sibling <img> First I tried with no avail Code: [Select]$('.main img ~ div.last').wrapAll('<div></div>'); I've tried adding Code: [Select]$('.main img ~ div.last').prev().next().wrapAll('<div></div>'); But that just wraps the next sibling, not including the previous. Could someone point me in the right direction?
jQuery introducing decimals/float errors into CSS() assignments...
Sorry if this isn't the right place but this is somewhere between a question and a possible bug report. Noticed this earlier against the latest 1.7.2 (testing in Chrome latest public release on W7-64) - not seen anything like it before so I'm wondering if something has changed recently? I've been testing a simple loop which moves something across the screen - but I'm seeing odd behaviour (almost certainly related to float errors) when setting CSS Properties through jQuery. Basically I do something
Change code with javascript/jquery
I have a flash music player that uses javascript for embedding. I was wondering if there was a way to dynamically change the url of the mp3 when you hit a certain page. Is this possible?
hideing task bar,browser address bar,menu bar in jplayer
hi, i want to full screen on j player , when i click on full screen video video should display completely at the place task bar, browser addressbar and menu total monitor should cover with video , how it is possible? can any one help to me. thank you.
How do I get the value of id="question_type_' + count + '"?
I'm having some trouble with getting the value of my radio buttons here: http://testing.feministbitch.com/index.php/quiz_creator. I have the full code at the very bottom. When you click add question, I made it so that people can choose the following radio buttons: true/false or multiple choice. I'm trying to do this: Based on whether they choose true/false or multiple choice, further radio buttons or inputs+drop downs would come down underneath the question. But i'm failing. Please help me :).
Cannot hide element on callback
Hi, I am building a set of control buttons using ASP MVC3 and JQuery 1.5.1. On my page I am showing a couple of images which I am attaching click events too in order to fire a post ajax request to retrieve a partial view from my controller. I am them appending a new image to provide the accept changes functionality once the view data has been changed. When I do this I want the image button that has been clicked to hide so the user cannot press it again, however no matter what I try the button refuses
Menu Hover Event Problem
Hi guys, I'm styling up a vertical 2 level navigation menu for a client website and I am having difficulty with the hover event for a parent li. 'About Us' and 'Services' both have a class of 'parent' as they contain a sub-menu ul. When I hover over the parent li I have changed it's background to be black and when the parent a within it is hovered over the link changes to white. However when my mouse leaves the parent to enter the sub-menu li the link goes back to it's default black. I need the parent
Shopping Cart Issue
Hello folks, I got a little complicated with summing the shoping cart prices. I have this shopping cart: I I wrote this function for updating the basic sum: function changePrice(divId, sId, price) { var x = $("#" + sId).val(); var y = $("#" + divId).text(x*price + " ₪"); } and the HTML form something like that: <form> <select id="selectQuan-1" onChange="changePrice('sum-1','selectQuan-1','678');"> <option value="0">0</option> <option value="1" selected>1</option> <option value="2">2</option> <option
resize div according to content size after $.ajax in IE7
I have a pop up that loads form a page when mousing over a link first, it loads a loading image as shown in the image below after that, it loads a page using $.ajax Jquery method as shown below: in IE 8 and 9 the div content of the popup are fit exactly to the content inside of it as shown above but in IE7 the div of the popup is way bigger than the content as shown below: below is the java script for tooltip (in our case the contentType attribute is set to page): (function ($) { // Implementation
How to create a popup within another popup
Can we create a popup within a popup. I have a thumbnail image and when I click on it, it popup with large image using fancy box. Now I want in such a ways that, when I hover over a point in the large image it should popup another image over it. How to make this possible. If anyone have example with a link then it would be more helpful.
wrappedElement
I need help resolving the following: I want to apply some jquery codes to play around some images. when i click i don't get the even images same things with the odd ones when i make the changes <script language="javascript"> $(function() { $("#evenButton").click(function(){ $("img:even").addClass("wrappedElement"); $("#result").html("Show Even Images"); $("div").addClass("wrappedElement"); }) })
hover slide problem
Hello, I've got an very annoying problem with my navbar. When the visitor moves his cursor over a button, a submenu should appear with a slideDown-Effect and moving the mouse out of the button should have a slideToggle-Effect. Unfortunately, many times when moving my mouse on the button, it slides down, slides up, slides down etc. And stops randomly when being sliden down. Code: <script> $(document).ready(function(){ $("#main1").hover(function() { $("#sub1").slideDown(400); }, function() { $("#sub1").slideUp(400);
.height() returns wrong height of the element.
Hi, all. I have some containers on my page, they are div.seconday_banner_box. Inside them there are the following elements: div.title, div.subtitle, div.text (and some others, which are not interesting for this post). I need all of the inner elements to be horizontally aligned, this should be achieved through assigning one height to all elements of a type (e.g. the height of the highest element of div.title should be assigned to all other div.title elements. The same with div.subtitle and div.text
Jquery Documentation in german?
Good evening, i come from germany and search for a german jquery documentation. Can someone help me? regards thorben
How to get the JSON response from php?
I've tried to submit with $.post, on php script i do a query and it return an array, so i use json_encode($results), but... it seems return an string than the JS don't recognizes as an array. The JS: $.post('plugins/LiveResult_1.0/LiveResult_1.0.php', { tab:tabela, val:ultimo, campos:campos }, function(resp){ for(i=0;i<resp.length;i++){ $('ul.ul_options',obj.parents('.div_liveresult')).append('<li>'+resp[i]+'</li>'); } }) The PHP: $tabela = $_POST['tab'];
Is there any way to change this code of input with jquery?
Hi all. I need to find an alternative to do the same but with jquery. Please See how it looks: http://jsfiddle.net/biofusionart/TLajP/ <body> <input style="color:#666" type="text" id="Name" name="Name" value="Name end Reason" onfocus = "if(this.value=='Name end Reason') {this.value=''; this.style.color='#333'}" onblur="if(this.value=='') {this.value='Name end Reason'; this.style.color='#666'}" /> <input style="color:#666" type="text" id="Surname" name="Surname" value="Surname" onfocus
obtaining values from stylesheet
I don't know if this is the right way to do it but it's the way I have been doing it: create an element and use the css method. I don't know if there's a way to obtain the values from the stylesheet directly? Anyway, I'm trying to obtain the font-size variable in here: #contents { font-size:130%; } with the following: cBaseSz = ($("body").append(t = $("<span id=\"Contents\">"))).css("fontSize"); t.remove(); However this returns the value in pixels ("px" at the end), and I want
Joomla and Ajax Problem
I am trying to use jquery, joomla and ajax together. I can use jquery to return a simple string in joomla; but when i try to return something more complicated or use the joomla classes in side of the php file on the server side notthing happens. I think when you use ajax from withing joomla you loose scope of the variable. Has anyone had this problem before? How do you solve it? Any help would be apprecited.
passing select value to php variable
I am at an impass. I want to pass the value of the selected drop down menu selected option. To a php variable that will be used in a MySQL statement, which in turn will alter a second drop down menu. Here is what happens. When I make my selection from the first drop down menu nothing changes on the second drop down menu. After I clicked the submit button then the change takes place. What do I need to do to make the change take place with out having to click the submit button? Thanks for any help,
can't get find/children/contents methods to return a set?
$(this).find("link") seems to return just one node, and not a 1 element array, so 'each' method won't work on it? Additionally using 'children' instead of 'find' returns nothing at all, even though the link tag is an immediate descendent??? I have the following xml: <idea> <desc>blah</desc> <link>http://blah</link> </idea> where 'this' was obtained with $(xmldoc).find("idea:first") and $(this).find("link").text() will return "http://blah", whereas I thought it needed to
Vendor prefixes in 1.8
hello, i am excited about automatic css vendort prefixes in 1.8 however right out of the box it doesnt seem to work. is there anything i need to take care of? i am basically doing this: $(bla).css('animation-name" , "start");
preview image
Hello, I am searching a plugin which will allow me to preview the image before upload so I can check it realtime. Is there any plugin available in jquery which will do this job for me? Please help me. Thanks in advance. Tegatti
dom object constructor can't get working
According to this page, I am able to create a dom object with jquery function thusly ('_' method prints to console): var idea = $("<div>"); _("idea: " + idea.text()); _("idea: " + idea.html()); Yet the last two methods return blank strings. What am I assuming wrong?
Specify a certain checkbox, not every single one on the page?
Specify a certain checkbox, not every single one on the page? $(document).ready(function(){ $("select").change(function () { id = null; $("select option:selected").each(function () { id = $(this).val(); }); $.get("_getPos.php", { cat: id }, function(data){ $('#pos').val(data); }); }).change(); });How do I specify in my selector that I want to link the .change()
correct syntax to show multiple messages followed by fade out
I'm trying find the correct syntax that will allow me to post multiple messages to a text box, with each one showing and then fading out. The current syntax I have is: if ($('#txtSuccess').val() == "Y") { if ($('#cbKeep').is(':checked')) { $('#lblErrMsg').delay(1000).fadeOut(2500).val("You May Add Another Hose Value.").delay(1000).fadeOut(2500); } else { $('#lblErrMsg').delay(1000).fadeOut(2500);
jQuery offset() wrong
I have an issue on a site, I think is a CSS issue, but really can't figure it out. I'm using jQuery to get the position of a Hidden form container div, when the mouse hovers on images on a slider. The hidden form popups correctly but in the wrong position, like if offset() got wrong values. This is the JS jQuery code (id is a parametter of my js function) var currentTarget = jQuery(id); var pos = currentTarget.offset(); container.css('top', parseInt(pos.top) + 'px'); container.css('left', parseInt(pos.left)
I want to develop my own Jquery.js
Hi All, I am working in www.infibeam.net. I want to create one jquery library for my one module. My Requirement is to get the parent element of the placed code and create one iframe which get the height and width of the parent element. I want to create One jquery file but i do not want to include any jquery library, is it possible ?
jQuery Media Plugin - results to a different tag
Good afternoon! I'm trying to use the jQuery Media Plugin from http://malsup.com/jquery/media/#overview and I would like to have the results go to a div instead of replacing the <a> tag. I'm new to jQuery but am learning fast. VERY awesome library! This is what I have set up: a file tree (using jqueryFileTree) that they user can navigate and click on a music file. The default action, as explained in the plugin link above is to turn: <a class="media" href="/path_to_file/filename">File Name</a>
Next Page