Using Jquery to control dynamically generated HTML
OK I've looked around the site for any hint on this but if it's there I've missed it, so sorry if this has been answered and I'm not seeing it. What I've got is a web page containing a DIV into which I'm dynamically putting a list of entries with selector buttons, I've simplified the code a lot for this example The target DIV looks like <div id="targetdiv"></div> I ask a server for a list and build a string that looks something like <div> nameofentryfromserver1 <input type="button" class="dynamicbutton"
Jquery 1.7.1 Sortable - placeholder
I have two sortables to drag and drop items to each other. I see that when I drag an item from sortable1, placeholder remains visible into sortable1 till the dragged item is completely in the Sortable2. I would like it to show placeholder into sortable2 as soon as dragged item comes over the sortable2. Please advice how can this be achieved. Please see attaches screen shots to check the current behavior. This is the code that I have to set the drag and drop - // make listbox2 sortable, inside "start",
problem with show/hide feature.
http://optiq-customtees.zxq.net/store04.html if you go to the link and click the "men" button... you'll see my image gallery pops up at the bottom.... so it shows the scripts works... but it's for some reasoning opening at the top of the div I have it in and I only see the back n forward buttons with the little dots on the bottom... without the JS in there it shows up perfectly in the div... what am I doing wrong here?... a quick run down of the method I'm using is this... the button for showing
Loading a page into a dialog with ui buttons
Hi, I am loading a page inside a dialog which has ui buttons. But it seems as that the javascript gets deleted and therefore the buttons are not displayed correctly. This is a shortened example: $(function(){ $('.edit_module').click(function(){ DialogBox(); //creates the dialog var module_id = $(this).parents().find('.mod_id').val() $('#dialog') .load('test.php', { 'p_module_id': module_id } ) .dialog('open'); return
Ajaxcomplete what selector to use
I am trying to figure out the correct selector to use with this event. After someone uploads a file, I want to run a function. I have tried the div that receives the updated file link and the form id, but neither works. Example code SCRIPT START $("#divthatgetsupdated").ajaxcomplete(function { alert () }) ); SCRIPT ENDS
size attribut on a jQuery input object
Hi all, I'm currently trying to use javascript as an object language and so I'm doing something like this : _inputNameExp = jQuery('<input/>', {'type': 'text', 'size': '25}); $('body').append(_inputNameExp); This partially works : input is created and inserted in the body but there is no "size" attribute... A workaround is : _inputNameExp.attr('size', '25');And now this is working but I don't like it... Am I doing something wrong during the input creation ? Is this a jQuery bug ? Thanks ! Also I
issue with Cross domain
I just started using jQuery and am trying to learn as I go, but I have hit a road block. I have a requirement on creating tab and bring external site to the tab i was able to create tabs using Css but dont know how to use Jquery to display external website within an tab.. The following are the files which i am using The tabs-no-images.css file /* root element for tabs */ ul.css-tabs { margin:0 !important; padding:0; height:30px; border-bottom:1px solid #666; } /* single
Setting Value for <Select> object
Hello: I'm trying to populate a <Select> object with the value from a user's record. Following is my current attempt: var var_ClientType = <? echo json_encode($ClientType)?>; $(document).ready(function() { //===================== POPULATE Drop down List ================= $.getJSON('select_orgtype.php', function(data) { var select = $('#orgType'); console.log("Var ClientType: " + var_ClientType); $("#orgType option:text=" + var_ClientType +"").attr("selected", "selected");
getting current element with id
Hi There Im using this kind of jsp script together with jquery. I would like to retrieve the value of a current element with id. Can any one help me to solve this. Below is my code: Functionality of my code: 1. Onload displays two phone numbers. - I got it 2. Then I want to update DB for the selected phone. - I got it 3. But for this update an authorization step is required which is the inline content. Once authorized the id of the selected phone will be carried to action class (which gives me wrong,
Error using appendTo
I'm trying to use appendTo with some PHP so I can move a ul to the bottom. Here is my code: <?php $currentPath = $this->getCurrentPath(); $currentCategory = Mage::registry('current_category'); ?> <script type="text/Javascript"> jQuery(document).ready(function(){ $(".childnav").appendTo(".catalognav"); }); </script> <ul class="catalognav"> <?php foreach ($this->getCategories() as $category): ?> <li> <a<?php if ($currentCategory->getId() == $category->getId()): ?> class="selected" <?php endif
ifames alternative
Hi, so i need to replace iframes for jQuery DIVS. Reading in the internet, its really simple. In proactice, it seems much harder. Notes: all external pages are within the folder structure to the index.html that is looking at them all images are in a folder called images Scenario: Index has a DIV called 'Sizzle'. in this div, i want to change the content to 3 possible pages (pg1, pg2, pg3) any one of these pages need to be displayed in the div. all pages have images on them. Questions: can images
Need help to get ID on selection of autocomplete
Please click on following link then click Find a pop up window appears http://webvikas.net.in/purohit/admin/insertrecord.php as shown below Search close Heading Please SelectbusinessOrthopaedicWebsiteWonder Name anand m nadkarni anand1 m nadkarni1 unmesh middle dr mahesh p. Mobile Number the input fields has auto complete feature which is working fine. My problem How to get record id of name selected
problems with variable in src path
Hello, I am aware that this maybe is not a jquery specific problem, yet, my code integrates jquey so I might as well ask it here. I have the following code: <script src="edge_includes/jquery-1.7.1.min.js"></script> <script src="edge_includes/jquery.easing.1.3.js"></script> <script type="text/javascript" language="JavaScript"> $(document).ready(function(){ $("#sub") .click(function(){ $("#the_pic").attr('src','images/Memoir_reg/Memoir_1.gif'); $("#the_pic_2").attr('src','images/Memoir_reg/Memoir_2.gif');
Reconnect (ajax)
The question is about ajax. How to reconnect if Internet connection is lost? Is this code is corrent? (I use timeout becouse there is no way to find out Internet connection problem.) $.ajaxSetup({ timeout : 30000 }); $.ajax().fail(function(error) { if(error === "timeout") { $.ajax(); } });
Doesn't add a click listener to a newly added element?
My jQuery: $(document).ready(function(){ var search = true; var results = $('#results'); var input = $('input[name="username"]'); var viewing = 0; $('button[id|="user"]').click(function(){ document.write('hey'); }); input.keypress(function(){ if(search){ search_f(); } }); $('#back').click(function(){ if(!search){ window.location.hash=viewing; } }); function search_f(){
Jquery newbie question help with appending a variable
So I have the following function : function getletter(){ var letter=$.trim($(this).html()); window.location='searchresults.php?querystring='+letter+'&querydesc=Name Like &querytype=1'; } in which i want to take the letter variable out and use it in another function to append: $("#main h2 a").append('+letter+'); Its working if I just put in a string but cant think of way in order for this variable to be taken from the other function and be displayed here.
Support for large Unicode characters?
Hi, Does jQuery have support for Unicode characters which require 5 or more hex digits? It seems to be inserting some extra (and strange) characters when I want to display large Unicode characters.
how to read iframe inner body content
i need to get all inner content with in the iframe. like head tag all content script style and body like all div with in the iframe
select filled/empty text inputs
Hi all, is there any way to reduce the set of matched elements to text inputs wich are empty and not empty ? jQuerySet = jQuery('#formID'); empty = jQuerySet.has('[type=text]:empty'); notEmpty = jQuerySet.has('[type=text]:not(:empty)');
jquery problem
hello sir , yesterday i had posted one question, but no reply, sir i am having trouble to achieve one functionality in my web page , functoinality-: i had mentioned one text in the header section of my page and mapped sliding window option to that text , sliding function works fine , but the problem is that when the window slides when i roll mouse over the text but as i drag mouse to the text written in window slided, the slided window returns back and i am unable to make use of text written in
Need help to create Array sort function
Hi, I have the following code snippet to do array sort, it is working but I would like to make it a function that can take an array and a sort field as parameters and return the sorted array. <script type="text/javascript"> var listitems = new Array(); listitems.push({id:1, firstName:'John', lastName : 'Doe'}); listitems.push({id:2, firstName:'Jane', lastName :'Doe'}); listitems.push({id:3, firstName:'Joe', lastName :'Smith'}); listitems.push({id:4, firstName:'Ann', lastName
Can someone tell me what component of my modal box is not compatible with IE8, & IE7?
Here is my testing fieldhttp://k8r.us/test12/test.html So I've built this modal box for work but unfortunately it doesn't work in IE8, but I have no idea why because another modal box I made does work ( http://k8r.us/test4 ) I don't know the difference between the two that is causing one to work and the other not. Test12 attemtps to make a very general modal box where Test4's modal box is heavily ingrained with the content of the page --- Keysle
Confilcs in my JQuery
Hi guys, Hope you are all well i am new here and would like a little help! i have a few scripts here that are conflicting! if i disable one of the scripts another one works and the same happens if i comment out the other script, basically both scrips wont work tougher! I know this has something to do with the Jquery version or does it? <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/javascript/styleswitch.js"></script> <script type="text/javascript"
POST variabel use AJAX
dear all, is it possible POST variable like this? function showdata(div_id, myURL, myvariable){ $.ajax({ type:'POST', url:myURL, data:myvariable, success:function(respons){ $('#'+div_id).html(respons); } }); } Please give me solution about it.. thanks,
Jquery option for a zooming map?
Hello all, I was recently impressed by this demo using "Adobe Edge" but I'm hoping there's a way via jQuery do recreate something of this nature for a community project. I want to take an graphic image and make it so when the user rolls over a certain point the map zooms in and shows some information about that spot. Just like below: http://html.adobe.com/edge/animate/showcase/mobilebrowser/mobile_marketshare.html I have ran into Mapbox but it seems I'd have to combo another plugin-in to create something
How to display the last selection (div) of each tab, clicking?. By default displays the last div
Hello friends. How to display the last selection (div) of each tab, clicking?. By default displays the last div jsfiddle: http://jsfiddle.net/hvZHU/31/ $("a.tab").click(function () { var muestra = $(this).attr("name"); var mostrar = $("."+muestra).children('li').children('div'); var ocultar = $('.menuMod > ul.menuPrim > li > div').not('.ver > ul[class='+muestra+'] > li > div'); ocultar.hide(); mostrar.show(); });
Append element depending on current slideshow
I have a slideshow with the following code: <div class="da-img"> <ul class="rslides rslides1"> <li id="rslides1_s0" class="rslides1_on" style="display: block; float: left; position: relative;"> <img alt="image01" src="img/img01.jpg"> </li> <li id="rslides1_s1" style="display: none;"> <img alt="image02" src="img/img02.jpg"> </li> <li id="rslides1_s2" style="display: none;"> <img alt="image03" src="img/img03.jpg"> </li> </ul> <ul class="rslides_tabs rslides1_tabs"> <li class="rslides_here"> <a class="rslides1_s1"
JQuery Image Slider Boo Hoo
I am attempting to learn javascript and love the concept of Jquery. I have made an image slider (www.regentstudents.co.uk/Slider) but it wont work, and I can't see why. Anyone want to have a quick look please? Thanks, Adam
jquery menu doesn't expand page
Hi, I have a vertical menu at the left of my site. When you click on the main elements, they expand with jquery to show sub-elements. The problem is the menu expanded is longer than the page and it doesn't expand the page at the same time, so it goes over the bottom of the page. How do I expand the page at the same time??? Thanks!!!!!
Issue with slider menu and smooth scroll
When "contact" is selected, the page scrolls down, but the slider only moves to "services" http://mlfoxdesigns.com/ - Only happens occasionally - Happens most frequently with IE9 and Firefox (of course) but happens with chrome as well. - Contact tab is the only tab with the issue Willing to offer design work in exchange for help (small logo, etc. see my website portfolio) Thanks!
MouseOver doesn't work with DIV added afterwords
Hello people, may the solution be simple, i don't get it. Here is the problem: When i append a DIV to the website with an jquery event, for exanple to add an extra button, the MouseOver event does not work with the added DIV. For the MouseOver just works with DIV i add at the beginning? Is that normal? Pretty strange i think. May you guys have an solution for me. Regards, Marcel
How to get span id ?
I have a page full of spans. Each span has 3 radio buttons in it. I have the following click event wired in a script tag and it works fine in compatibility mode of a browser but not IE9 or nor Chrome 22.0.1229.94. How can I get the span ID ? I get NaN or undefined. var _ladderId = $(this).closest('span').attr('id'); alert(_ladderId); I alos tried to use a hidden value with this script: var _ladderId3 = $(this).parent().find('.MyLadderId').val(); alert(_ladderId3); HTML: <span
firefox issue, textarea wont override default on keypress enter
I cant figure out how to prevent firefox from creating line breaks on key press "enter". http://jsfiddle.net/cjTu9/11/ What i want is alert to trigger on key press enter, without creating linebreak.
Show content in a external windows (overlay from jQuery Tools for example) and passing data to the main window
Hi every, I've a page where it's supposed to open a new window and show some content from DB with pagination and so on. In that window I have a link "Agregar" and when I click there the row or the content of the row should go to a input in the main page but storing different values, for example: ID, NAME because if I insert only ID then the users can't know what they insert. Also I need to insert more than one record, any help? I was thinking in have a main input and a hidden input and put values
Cannot connect to jquery website. Only on forum area.
I am having a problem connecting to jquery.com. I can only access this forum of jquery.com and all else is timed out.Please any help. Im using win7 ultimate, Im from the Philippines and us using globe wimax broadband.
Preventing a full page reload?
Many developers achieve this by having the event handler return false,wats the need of doing this?
Creating a JSON data object
Hi, I have to create a message that looks like following within Javascript. I am unable to create the portion where, "serviceDesc" addition. { "applicationName":"Tesing", "projAccNumber" : "TG", "queueName" : "development", "exeuctableLocation" : "/bin/echo", "scratchWorkingDirectory" : "/tmp", "cpuCount":"12", "hostdescName":"localhost", "maxMemory":"0", "maxWallTime":"0", "minMemory":"0", "nodeCount":"1", "processorsPerNode":"12",
How to test for a blank value in the ajax return value ?
Hello, Im wanting to display a dialog box if a ajax return value isnt blank. How do I compare to a blank value? success: function($html){ if ($html !== "") { $("#msgarea").empty(); $("#msgarea").append($html); $("#msgarea").dialog({
call jquery function dynamically
I'm working on a page where I'd like to have multiple accordions or datepickers. I understand that I can add the following code multiple times to my page and change the selector to the ID of the item I want to work with. <script> $(function() { $( "#accordion" ).accordion({ collapsible: true, active: false }); }); </script> What I would like to do, and what seems more natural to me, is I would like have that code only once with a variable for the
.click function highlights text / elements
Hello, Whenever I am using the .click function, it is highlighting the text and other elements that have the same class name. Does anyone know what is causing this and / or how it can be fixed? Example - [ Button 1 ] [ Button 2 ] [ Button 3 ] If buttons 1, 2, and 3 all had the same class name "button", whenever I click on a button the other two become highlighted.
Next Page