Trouble with .on()
Hello All, I am relatively new to jQuery and I'm having some difficulty using .on(). Right now, I am just trying to get a feel for how this method works by creating a demo that shows and hides a div when an anchor is clicked. I know that .toggle() can be used to show/hide elements but I want to learn .on() so that I can use it for more advanced things later on. From what I understand, it will be used in place of .live() from now on. The first time a#hide is clicked, it should hide div#hideMe, change
Add delete icon to dynamically created <option>
Hi, I have a <select> for industry which is by default one on the form and allowing user to create more using jquery I want to include a delete icon beside the dynamically added <option>. How can id do this? <tr> <td valign="middle">Industry</td> <td valign="middle">:</td> <td valign="middle"> <div id="container"> <select id="cboIndustry" name="cboIndustry[]" style="width: 100%" required> <option value="" selected>[Industry..]</option>
making ajax request and waiting for file
I have a click function that almost works, but it seems I have misunderstood how the ajax request functions. I want to post a string and then wait for a file which I will process when it arrives in the directory. My script works if the file already exists, but not if I click and then add the file. What am I missing? Thanks for any assistance <script> //post NLQ string $(document).ready(function(){ var nlqString = ''; $('#nlq-execute').click(function(){
the problem with integrating jquery into submit form
Hi! I have a login form with set defaultValues. I want to mistakes jump out when the login and password are empty or when they are default. But that does not work. I tried this and that, but got troubled. The mistakes should jump out in ids "login_err" and "pass_err". Please help. My form: <div id="login"> <form method="post" style="background:inherit"> <table style="align:right;text-align:right;margin:0 auto;"> <tr> <td id="login_err"></td> </tr>
jQuery 2.0 | Replace each div text with substring from comma delimited string
Hidden #main-input contains a string of comma-separated values. I need to find all same class divs that each contain same unique text and replace that text with the relevant comma-delimited substrings stored in #main-input, like so: 1- Find the first .container div that only contains the text "findme"; 2- Replace "findme" with the first comma-delimited substring of hidden #main-input; 3- Find the second .container div that only contains the text "findme"; 4- Replace "findme" with the second comma-delimited
jQuery Ajax failing to call to MVC 3 Controller method on Windows XP
Hi i am invoking a Ajax call to my controller method from a view on button click. Ajax method fails by giving the error "Object not Found". This happens when it is deployed on Windows XP. It does not happen on Windows 7. I am stuck up on this issue from Two days with no help. Any help would be much appreciated. Here is my code. DisplayAttributes.cshtml function DisplayFullImage() { var model = { ChoosenColor: sendDesignerData, TotalDensity: TotalPixelFilled }; var urls = '@Url.Action("GetColors","Designer")';
How to send forgot password email in jquery? I have the same code i n php? can any one help me write a jquery code for the same.
<!--AJAX CALLS THIS CODE TO EXECUTE --> <script> if(isset($_Post["e"])){ $sql = "SELECT id, username FROM users WHERE email ='$e' And activated='1' LIMIT 1"; $query = mysqli_query($db_conx, $sql); $numrows = mysqli_num_rows($query); if($numrows >0){ while($row = mysqli_fetch_array($query, MYSQLI_ASSOC)){ $id = $row["id"]; $u = $row["username"]; } $emailCut
email Validator not Working
<script type="text/javascript"> $('#admnmail').blur(function() { var sEmail = $('#admnmail').val(); if ($.trim(sEmail).length == 0) { alert('Please enter valid email address'); e.preventDefault(); } if (validateEmail(sEmail)) { alert('Email is valid'); } else { $('#admnmail').val(""); alert ("NO"); e.preventDefault(); } }); function validateEmail(sEmail) { var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
Jquery mouseover problem
Hi, Need your help!! My jquery animation not working proplerly when I mouseout from the navigation menu 01 and mouseover the another menu 02 before animation completed to the navigation menu 01. But, animation work properly when i wait to complete navigation menu 01 and then mouseover the cursor to navigation menu 02. Thanks, Anna
How to use jquery accordion in a jquery dialog
Hi, Iam using this code for my online shopping site.This code is used for quick view of an product.While user click the quick view a dialog open and show the product image,price,description.Now the issue is the description is lengthy.So it display dialog broader.(It increase the dialog width according to description).So that i want to use Accordion.But i dont have idea about how to use this.i read this http://jqueryui.com/accordion/.But i dont know what i need to download here http://jqueryui.com/download/.I
customize toolbar button
Dear All, I am working on a project where I need following functionality. please share your ideas: I want to create a customize toolbar popup which consist of buttons for B (Bold), I(Italic) and U(Underline) etc. I have asp.net listbox (dropdown) on same page. The functionality which is required is that when user select any value from listbox and click on toolbar button B the selected value become bold, similarly for I and U etc. Is it possible with jquery? How to implement. Thanks in advance.
how to create a form that works
i want to create a form in Jquery 1.9.1 and i have looked at tutorials but none of them work if you can please tell me and also i don't want to download anything
Iam using setinterval for autorefreshing but it showing my JSON data repeatedly
JSON: "Facebook": [ { "facebook_name":"Apple", "facebook_post":"Apple posted a photo", "facebook_comment":"Apple commented on a photo", }, { "facebook_name":"Mango", "facebook_post":"Mango posted a photo", "facebook_comment":"Mango commented on a photo", } ] } Script: $(document).ready(function () { var facebook=null; var array=null; function refreshEachMinute(){
restrict autocmplete's data
Hi, I am using the following code to populate data from MySQL to jquery autocomplete. is it possible not allow user to write his own company name but only select USING autocomplete so if the company name he entered is not within the list it it won't accept? $("input#txtCompany").autocomplete ( { source : function (request, callback) { var data = { term : request.term }; $.ajax ( { url : "../autocomplete_company.php",
why it's not redirecting?
Hi, I am using the code below to sign in user with ajax and it's working fine when I just user window.location in the success but when I tried to give a condition to check the querystring ["redirect"] it will just stop on the loading animation and do noting. what's wrong with this code please? $(document).ready(function(){ $(function() { $( "#btnSignin" ).button(); }); $('#btnSignin').click(function() { $('#waiting').show(); $('#frmLogin').hide(); $.ajax
Issue with appending html to list
I'm trying to take my cat_id and append it to #id- so that the points are appended to the correct list. function load_sidebar_points(){ downloadUrl("cat_points.php", function(data) { var point_xml = data.responseXML; var markers = point_xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var id = markers[i].getAttribute("id"); var name = markers[i].getAttribute("name");
Method load not working on distant server
Hi! I'm using codeigniter. The method load() works fine on localhost but not on distant server. This is firebugs screenshot, it shows the adress in red. But when I copy these adresses to the adress bar (browser) they work fine! Anyone can help me please? Thanks! :)
Change text font color in link
I have a link ('a'). I can display the text() property. Is it possible using jQuery to change the color of the text? ("#myLink").text().css('color','red') throws an error (object does not support this property or method).
date picker
how to disable days before current date by using jqueryUI widget datepicker
<div> tag
div used in body ,the same can be used in script tag ...is it possible?.......
how to add a download link in fancybox
How to add a download link in fancybox, i'm using opencart. i found this code: $(".fancybox").fancybox({ afterLoad: function() { this.title = '<a href="' + this.href + '">Download</a> ' + this.title; }, helpers : { title: { type: 'inside' } } }); Where to put exactly ? tnx
Advertising Slideshow with text and price tag
Hello, I need some help using jQuery, I have a store, and I'm thinking to connect PC to a TV advertising about best "Sales / Products" The idea is: Image of the product with a bit of text under it, then price tag at the side. And then it will go to the next product, with fancy movement and such. I Wonder if there is finished scripted jQuery slide-show, i can download, i have tried to search the web for free to use such kind, but I'm only able to find normal slide-show with text without price tag
Stop Slider from Sliding!
Hi Guys, Im very new to JQuery, this is the first time I have tried to edit. I'm using a wordpress theme which allows html5 video to play in a responsive slider. My problem is that I only want one video to play and thats it. I do not want the slider to slide to the next blank slide... I am searching for a way to prevent the slider from sliding. (I know it sounds weird but I would never be able to code a responsive video viewer from scratch) Can anyone help me place some code to prevent the slides
Creating jquery with software?
Hi. I am new to JQUERY and I am creating a website to create animation. I can see that jquery is used a lot for effects but what I would like to do is create my own animation using jquery instead of using other peoples. I want to be able to use a software such as Photoshop to generate ideas, experiment and create a prototype. Using code (jquery) straight away doesn't alway me to do this. At the moment I dont really know what I want because I'm still chopping and changing things on my site so I don't
Want a resizble pop-up
Hi Jqeury Guru's, Im trying to make my pop-up resizeble. But I did it first in my CSS but it dont work to resizeble the popup. Im using the following Jquery for pop-up; /***************************/ //@Author: Adrian "yEnS" Mato Gondelle //@website: www.yensdesign.com //@email: yensamg@gmail.com //@license: Feel free to use it, but keep this credits please! /***************************/ //About Page Pop Up var popupAboutStatus = 0; function loadPopupAbout(){
set height of all elements
on resize I want to do something like that : $(document).ready(function() { var newWidth = $('.span3').width(); $('.box').height(newWidth); }); I get the width of any (or the first) .span3 in my page and all the .box of the document must have height:.span3-height thanks for helping
Responsive Carousel slider
Hi, i need to create a responsive carousel slider that scrolls on mouseover. Example if we hover on the left part the items will start to move from the left and vice versa like in this example: http://rascarlito.free.fr/hoverscroll/. I exactly need like this slider in horizontal mode but also it must be responsive. Thnx
unknown xml display in html table
I am trying to read from an xml file where I won't know the names of tags, but I will know the root element, which will contain <rows>, something like this: <?xml version="1.0" encoding="UTF-8"?> <data> <row> <nai>23</nai> <source>it</source> <size>big</size> <activity>rolling</activity> <location>here</location> <unit>cm</unit> <time>now</time> <equipment>red truck</equipment> <remarks>none</remarks> </row> <row> <nai>24</nai> <source>him</source>
Repopulate cloned Item from MySQL to the form
Hi, I am using the below code to save the industry to company_industry table ( I wanted to know now how can I populate again the data when editing the company so it will appear in <options> element? I thought of using PHP with just normal loop but I'll still have a problem with the btnAddIndustry and the delete button because only the first cboIndustry will have the add and all others will have the delete button. this is what I though to have: <?php $mysql_command = "CALL sp_populate_company_industry(:param_company_guid)";
$.ajax using COR...!
I have some understanding on cross domain calls and want to confirm them. 1. The cross-domain calls can be made in JQuery only when we set the datatype as "jasonp" or by using COR? What if the calling service is not returning the data in JSON format? 2. The ajax COR request code I have pasted below is correct or am I miss something? //serviceURL is the actual external URL var deffered = $.ajax({ url: serviceURL, type: "POST", async: true, crossDomain: true,
checkbox group where one value shows a set of radio buttons
Thank you to everyone that has helped me in the past. In my form is a checkbox group, that when one value is checked, a set of required radio buttons appears. The jquery show hide is working. When this particular value is unchecked, the set of radio buttons becomes not required and if a radio button was clicked, the value is removed. This is working great too When the form is submitted, the person is taken to another page to review their form. While the value is still in the database, the jquery
Always show the full list items in autocomplete menu
Hi, I am try to use a jquery autocomplete as dropdown menu, how can i make it always show all list items, even if an item is selected. Thanx
Get d of td within a div (table , td is generated using external program)
I have a div and withing that a table which is generated when some button is clicked Sample will something like this <div id="maincontainer"> <table id='tableabcd'> <tr> <td> name 001 </td> <td id='edi01'> edit </td> <td id=''del01'> edit </td> </tr> <tr> <td> name 002</td> <td id=''edit02'> edit </td> <td id=''del02'> edit </td> </tr> </table> </div> Pls note that the values withing div id "maincontainer" will be changing but its id's will always start from 'edit' or 'del' I want to get id of
How to present information in a limited amount of space in accordion jquery?
Hi, Iam using this code to show the product image,price ,description in a dialog.iam using accordion menu also.But the problem is description does not showing in a limited amount of space in accordion.like this it is showing.What is the reason for this?What i have to do now? My jquery is as follows: <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/ui-darkness/jquery-ui.css" rel="stylesheet"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
how to select <option> value after loading with ajax
Hi, I am using jquery to populate cities from selected country in a <select> element using the below code. This working perfect when opening it for a new company record. what if I want to edit existing record by detecting the $_GET["id"] of the company? I am setting the cboCountry value to $company_country which is a value from MySQL.. now how can I populate the modify below code to populate the cities for the selected country ($company_country) and also make the selected city = $company_city. Hope
get the current value(clicked value)
Dear friends, i have dynamic row values <a href="#" compid="1" compane="CSK1">Company</a> <a href="#" compid="2" compane="CSK2">Company</a> <a href="#" compid="3" compane="CSK3">Company</a> <a href="#" compid="4" compane="CSK4">Company</a> my question is, how can get the current value(clicked value) from on click of the <a href="#> using jquery.
How to Force cache to clear for AJAX call
I have a section of a page that will not change 99.9% of the time. To that end I have added caching to the page and it is working correctly by the following commands. .net [OutputCache(Duration = CacheTimeOut, VaryByParam = "*", Location = OutputCacheLocation.Any)] JQuery $.ajax({ cache: true, As the page won't generally change, I would like to set CacheTimeOut to be a week. The problem is the 0.1% of the time when I have to update the page. I would want the page to refresh as soon as possible.
How to create JQuery Class Private Variable
Hi all, I am not a JQuery expert so I am very confused about creating private variable for an object instance. I want to create a simple jquery plugin, but all instances see the last declared class variables. Can someone tell me the reason and the solution ? Sample code : ;( function ( $ ) { /* This is a private declaration, isn't it ? */ var settings = { pagesize: 10 } /* Constructor */ $.fn.myPlugin = function (options) { /* Call a private method
jQuery “.then()” is not sequent, and not working as expected
I need to call three functions one by one. For this purpose i am using jquery deferred "then" to chain the calls. Here is the code: function fillQuality(x){ console.log('Q'); var deferred = jQuery.Deferred(); var intervalId = setInterval(function(){ clearInterval(intervalId); console.log("Quality: ", x); deferred.resolve(); }, 2000); return deferred.promise(); }; function fillPrize(x){ console.log('P'); var deferred = jQuery.Deferred(); var
Issue On Scrolling to A Row in Table
Can you please take a look at this DEMO and let me know how I can use jQuery to scroll to the selected row or animate that row to the middle of the scrolled div sc? Here is the code: <div id="sc"> <table id="mytable"></table> </div> <button class="25">Scrool to 25</button> <button class="75">Scrool to 75</button> <button class="125">Scrool to 125</button> <button class="199">Scrool to 199</button> <button class="0">Scrool to 0</button> <script> $(document).ready(function () { for (var i = 0;
Next Page