How to custom data text value in autocomplete ?
Hello guys. I have try show data and get value using autocomplete jquery. Textbox will show data choose and label will get value .But it's error Uncaught TypeError: Cannot read property 'DEPARTMENT_ID' of undefined . This is data JSON when i see console.log Object {d: "[{"DEPARTMENT_ID":"D00000000001","DEPARTMENT_NAME"…"2015-05-05T00:00:00","EDIT_BY":"","FLAG":false}]"} d: "[{"DEPARTMENT_ID":"D00000000001","DEPARTMENT_NAME":"HR","DEPARTMENT_DES":"HR","EDIT_DATE":"2015-05-05T00:00:00","EDIT_BY":"","FLAG":false},
How to make jQuery accordion menus slide back up?
I'm having a hell of a time with a jQuery project I am working on here: http://jsfiddle.net/digitalsky/undjdrg8/9/ First off, let me start by saying I AM a newbie to this, I'm learning as a I go as my experience is mostly all front end stuff (HTML, CSS, etc.). Anyways, what I am trying to accomplish here seems simple, but it's driving me up the wall! I want the 'Course Schedule' tab to open it's sub-menu when clicked (which it currently does if you see my fiddle above. Okay, so great, half of it
iOS7 Network Activity Indicator keeps spinning after an $.ajax request
I'm developing a webapp with jQuery Mobile 1.4.2 and jQuery 1.11.1 and run into an issue with Safari in iOS7. Whenever I perform an $.ajax request (see general example below) the iPhone/iPad Network Activity Indicator starts spinning and does not stop until I close the webpage. The problem does not occur on my old iPad1 with iOS 5.1, and Chrome also runs the web app without any issues on an iPhone/iPad with iOS7. I would like to allow users to run the web app from the Home Page, and that is causing
addClass whithout events or commands
I have a div that needs to be hidden or not as returned value from the database , suppose when logging into the system is loaded in the user session index.html < html> < head> <title > test < / title> < ? php $ admin = 1; if ($ admin == 1 ) { ? > <script type = "text / javascript" > $ ("# divMeu " ).show () ; // << == How to run this event without using .click events </ script> < ? php} else { ? > <script type = "text / javascript" > $ ("# divMenu " ).hide () ; // << == How to run this event without
incorrect form serialization with jquery
On my CMS, I use marked to public posts, and on form marked put generated html into textarea, when I submit for first time (creating of the new post) form is serialized correctly. My CMS after creation append's one input (type text) with some specific info and button's to edit and delete, the process is the same but when I try to serialize form: $(e).serialize() // e ----> '#form' I see the old value (original) of my textarea, and only after submitting (editing) I get the correct serialized info.
Add delay between sliding divs in jquery
I am thinking to add a delay, but I could be wrong. Maybe there is another solution. Here is a new updated fiddle. I have the slide direction correct now. Now the slide doesn't look so good. When the colored box slides out to the left, it reveals the gray main menu box. I need it NOT to reveal the gray box but to have the gray box slide in. Maybe it is a problem with the timing. There might need to be a delay before the gray box slides in to make it look good. The gray box text should have space
Help with coding different types of jQuery sliders
Hi, I have 3 different sliders to code. I am using bootstrap. I coded another jQuery content slider which was fairly simple using bootstrap's own javascript and some CSS. But I am stuck with these three. Any help or plugins that look like any one of these (kudos if more) will be appreciated. No. 1: Content Slider with one image each and content below it for each slide description. On the active state the image moves a bit forward as can be seen in this image: No. 2: Image gallery. Active Image is
loading data from database accordion
I have an accordion that I want to create the tabs from a database loop. so each will have a unique id. when a tab is opened with the id, i want a call to the database to load appropriate data from the database and populate the accordion.
Add div class onclick andstore user choice
I thought of giving it a shot myself, it isn't that hard but I'm stuck with a syntax error and probably am not doing the most effect method of achieving the goal. demo here of what it is like on an other site: http://forum.jquery.com/topic/how-to-use-this-switcheroo-plugin-but-not-for-displaying-product My fiddle: http://jsfiddle.net/master412160/wxx1379w/ To do: Build cookie function with https://github.com/carhartl/jquery-cookie that stores the option selected, default is desktop view. Fix the
Problem with animate elements with for loop using next()
I want to change background-color (whatever) for each of test_div when test_div_main is clicked. I want to do this in loop because in future i want to set color depended on i value in to loop. This is clear html code: <div class="test_div_main">1</div> <div class="test_div">2</div> <div class="test_div">3</div> <div class="test_div">4</div> <div class="test_div">5</div> <div class="test_div">6</div> <div class="test_div">7</div> and this is jQ code: $(document).ready(function(){
Select data from empty and in span
hello .. i use a Ajax file to populate a jquery pulldown. everything works perfect .. but i can ONLY select a item if i click beside the text (outside the span) does anyone know how i can change the .live to have it run if clicked on the full div id=results script: $(document).ready(function() { $(".search").keyup(function() { var searchid = $(this).val(); var dataString = 'search='+ searchid; if(searchid!='') { $.ajax({ type: "POST", url: "<?=$Site['paths']['url']?>lib/ajax/locationinlinesearch.php?country=<?=$basecountry?>&bplace="
A Good Birthday Plugin
Hi, Can anyone recommend a good birthday plugin which also allows to enable and disable Year in case user don't want to enter the year? Thanks, Jassim
Why jquery functions not work on jquery response ?
Hello, I create a function of jquery ajax it's returns html there are some jquery functions which trigger on class like modal box and other but they not work for html elements which comes from my jquery ajax html so what i need to do for this ?
Redirect if QueryString exists
Hi, I am using below code. It works fine when no url query string but when url query string is specified then it's just reloading the same page with no error in google console. can you help please.. success: function() { if (window.location.href.search("[?&]url=") != -1) { window.location.href = redirect; } else window.location.href = 'index.php'; },
.outerHeight returns wrong height if code is inserted before the opening <doctype> tag
Obviously this is user error, but I run into it a lot in our distributed application. People complain that things are not showing up, but the reason why is code has been inserted before the <doctype> tag. In this instance, the jQuery height methods all return the wrong document height. This is easy to reproduce. Use .height on any element to get the proper height. Then insert this before the opening <doctype> tag: <script>var error;</script> Then try again. The height will be wrong. Is this something
Repetition of function
function item(ui){ var active = $('#accordion').accordion( "option", "active" ); var catidthis = $('.ui-accordion-header-active').attr('id'); ithtml = ''; $.post('sample.php',function(data){ $.each(data, function( index, value){ var dividit = value.ItemID; var cls = (value.Isg==0) ? 'green' : 'red'; var bord = (value.Isg==0) ? 'green_border' : 'red_border'; ithtml += '<div class="normal_add_box left" id="'+ dividit +'">\ <div class="nm_image_area" id="nm_image_area">\
Uncheck checkbox if clicked on that corresponding div
I have set of checkboxes on the left panel, when i click any one checkbox i activate a div filter on right top pane which contains a cross, when i click that cross the checkbox should get unchecked this should happen dynamically for checkboxes. This is my progress: https://jsfiddle.net/edaatzy8/
Function only excuting with debugger after creation
I have a Visual Studio 2013 project, ASP MVC 4 to be more specific. I am working on some dynamics multiple selects, the should be filled with the selected options when I chose a value on the parent select. It only works when I apply a debugger line to the top of the function. Here is fSFiddle https://jsfiddle.net/qtuxtrmL/ Here is the function with the issue function SetSelectedValues(elem) { debugger; var combo = "#serial" + String(elem); $(combo + ' option').each(function
How to capture js error on Onload and every event in JS?
How to capture js error on Onload and every event?(button click,onchange event,page onload )
jquery ajax calls not getting content ,but still the request is success (i.e Http status code : 200)
Hi Team, I am facing a problem with jquery ajax call. Every first request on the each day ,Jquery Ajax call was not returning the data, but on subsequent request it is returning the data. Please find the below sample code : $.ajax({ url: http://localhost/Home/GetData, dataType: 'json', type: 'post', async: true, cache: false, data: param, success: function(Data) { --my logic goes here } }); Could some one please help me out that , what
jQuery .show issue (Safari iPad)
I have recently started to learn jQuery and have been developing a responsive carousel to practice however I am encountering a strange problem where .show() doesn't seem to work correctly on Safari for the iPad. The issue I am having is that when I click the left arrow I want the second slide to display however this doesn't seem to work (works in all other browsers including Chrome for the iPad), if I change the code to show the third slide rather than the second it works fine so I think the problem
[SOLVED] change all data-item
I have many tags with data-item="value" it can be span div input or fieldset .. any ! depending on a value let's say if ($v == 1) how can I addClass to all the tags with data-item="1" ? thank you
Form input field one after the other
I have developed the following form using Bootstrap and have disabled all the input fields except the first input field by giving a common classname.Now how do i enable them in such a way that after i enter surname i should enter first name after first name last name and so on. Any help would be greatly appreciated . Thanks in advance The following is the code which i have used to disable the input fields. $(document.ready(function() { $(".disab").attr("disabled",true); }).
Multiple Jquery Conflict
I am an intermediate user of Java Scripting , Jquery, PHP and HTML. I am trying to develop a website that has multiple scripts. Individually the scripts are working fine. But when I ad WOW Slider Script, it causes to stop working menu script effects and slider. I have uploaded incomplete website at my friend's webspace. Plz have a look at the page: www.inetstudies.com/perfect/index.html By default, the image slider has stopped working, menu effects have been disappeared, but the wow slider at the
Algorithm jquery each & show, hide
Hy All , I have Algorithm but I do not know how code My Algorithm 1. if value in class1 same like value in class2 then class2 it's will be displaying ex: if I'm Selected value 1 than every class2 which has value 2 it's will be displaying 2. if the value of the class 1 is not present in class 2, the value will be in the show all for more please check :https://jsfiddle.net/badvz/5aRvF/312/
Getting value from its div set having same class name
I have multiple elements having same class names as below: <div class="call-now">First</div> <div class="hideme">1234</div> <div class="call-now">Second</div> <div class="hideme">8855</div> <div class="call-now">Third</div> <div class="hideme">7411</div> Whenever call-now is clicked it should show the value from its hideme div on its click. Currently by below code it alerts all possible values from all hideme elements: $('.call-now').on('click', function() { alert($('.hideme').text()); }); I want
Help with upgrading from 1.10.2 to 1.11.3
Hello! I'm currently trying to upgrade from 1.10.2 to 1.11.3 and am running into some troubles. I work in a shared development environment so I unfortunately have to contend with other JS libraries occasionally conflicting with jQuery. To get around that (and because I was unawares of some solutions available to deal with that), I have always accessed jQuery using 'jQuery' instead of the $ alias, for example: jQuery( "#my_tabs_div" ).tabs(); I suspect that has something to do with the following
Keydown problem
Hello I'm having a strange delay between the input content and the val value... I mean: the val value is always one step behind of the real content of the input box... I don't know what am I doing wrong... Would you please give me a clue? THANK YOU!!! $(document).on("keydown", "aside form input[name='search-shop']", function(){ var val = $(this).val().toLowerCase(); if(val.length > 1){ $(".galleryFront h2:contains('"+val+"')").closest('.gallery').fadeIn("slow").siblings('.gallery').hide(); }else{
Help ! Functions !!!
how to make A() execute after B() is executed !? function A runs in A.js file wich is added to the page-b.html <head> : <head><script src="A.js"></script></head> function B runs inside page-B.html like this : <script> B(); </script>
jQuery .load() causing method to execute multiple times...I believe
I have a page that when I go to it n times, the JavaScript I have attached to it gets executed n times. So, the first navigation only gets executed once and works correctly. I believe it is because I am using .load("something") is causing the JavaScript to get loaded more than once (after the first time) and then gets executed n times it is loaded. How can I get my JavaScript to load and execute only once? The Path.map() functions you will see below is from a plugin by https://github.com/mtrpcic/pathjs,
replace text in body
hey guys im a ajax request to get selected words so that i can then translate the text in my page...but while trying to replace text which works it effects every other script from working like my form validation, password strength meter etc... function translate(words) { var language = localStorage.getItem('language'); var parameters = {from: 'en', to: language, words: words}; if (language === null) { language = $('#language').val();
Simple script sometimes not working
Hello, I have problem with very simple script. This code sometimes working, but sometimes I must refresh the page. Script: <script> $(document).ready( function() { $("#loading").fadeOut('normal'); setInterval(function() { $("#battlelist").load("rpsselect.php"); }, 1000); }); </script> PHP: $pdo = new PDO('there is host, password, user, and db name'); $stmt = $pdo->prepare("SELECT id, defender, coins, defender_avatar FROM
Window load not working as excpected ?
Im using two php post methods in window.load function, the first php post data is working perfectly, and second php page Profile.php is working alternatively i mean on first reload it is working, after reloading it again it isnt working. vice versa . . Not knowing where the problem is..!! $(window).on('load',function(){ if(localStorage.getItem('verify')==1){ if(localStorage.getItem('claim') == 0){ if(localStorage.getItem('delete') == 0){ $.post("/Web_Service/Load.php",function(data){ $('.name>p').html(data.Name);
how to capture textarea events when character data is entered
I'm having problems capturing any events from a textarea as I type a particular data string (++) into it. My ultimate goal is to produce a popup whenever two plus-signs (++) are entered into the textarea and some data has already been read from the server. The data read from the server will be displayed in another textarea in the popup, for further editing, and then redisplayed in another readonly texarea on the main screen, associated with the popup. The original textarea is defined like this:
Can jquery count a certain value like total posts or topics?
Say you got a forum that outputs per forum row the total posts and topics. Can I run a little js script that counts the total posts or topics or both and if say <= 150 posts = show a button called popular which means the forum in question is popular <= 25 topics = show a button like above called popular but not show the button twice lol. Just once so a function that counts both topics and replies that allows the button to show up if both conditions are met and if not be hidden. Much like the idea
library conflict
Hi, I have computation form at first everything was working fine. here's my code. <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script type="text/javascript" src="<?php echo base_url(); ?>assets1/js/moment.js"></script> <script type="text/javascript" src="<?php echo base_url();
How to use the window object?
How can I use window objects? Let's say for example I do something like this: var window_tool = window.open('bla bla bla '); var images_one = window_tool.$("img").attr("src"); alert(images_one);In the example code above. How could I alert the source of the image loaded in the 2nd window object? I am talking about opening a window. Then trying to access the dom of that window to grab information from it. The code above should just grab the images source url and then show it in the alert box. I tried
Make a button show if a sentence :contains (password)
My JS; $(document).ready(function(){ if ($(".wrapfix:contains('password')").length) { $(".buttonprotectedbox").removeClass("buttonprotectedbox").addClass("showbutton"); } else { $(".buttonprotectedbox").show(); } }); My html: (its phpbb) <div class="wrapfix"> <div class="buttonprotectedbox"> <a title="Password Protected Forum." class="ui-button ui-widget ui-state-default ui-corner-all buttonprotected">Protected</a> </div> <!-- IF forumrow.FORUM_DESC --><br /> <span class="forumdesc">{forumrow.FORUM_DESC}</span>
How to get the value of dropdown list generated dynamically
Hello, First row of input fields are manually put in html the rest of the rows are generated dynamically by clicking add options (the values of the combox box is also coming from database through ajax from second row onwards) When I select the first row combo box - I am able to get the values of selected item and its price is fetched through ajax call and inserted into the nex text box. My problem is that when I select the second, third etc row's combo box I am not able to generate the values of
jQuery Accordian dropdown (menu option) breaks when toggling between external SSI (server-side include) files
I'm fairly new to jQuery, but understanding it theoretically. What I'm battling with right now is with the following server-side includes and how to do the JS to either display one OR the other include within the div . I've tried .load and also .hide, .show on the id's below, by alternating when the language icons on top of the site are clicked. I think my problem is the SSI files (which are language files - one english, the other spanish) are conflicting because of the same div id's which is "menu"
Next Page