if else statement2 problem in jquery
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script> $(document).ready(function() { $('#year').blur(function() { var yearRegExp = /^[0-9]+$/; var v_year=$("#year").val(); if (v_year=="") //not working in o/p { $("#year").css({"border":"1px solid red"}); $("#year_error").text("you can't Leave This Empty!"); $("#year_error").css({"margin-top":"5px"});
Jquery working offline but not online!!!
Hi there I am using this Jquery plugin. It works absolutely fine when I preview it offline but when I upload it to my hosting account it shows nothing but a blank white screen. Here is the link to the Html: http://www.beaconhousedefence.ml/counter/index.html Here are the links of JS file being used: http://www.beaconhousedefence.ml/counter/js/count-jquery.js http://www.beaconhousedefence.ml/counter/js/jquery.responsive_countdown.js Please help me and tell me why is this happening?
How to cut a certain element and paste it at another place on a webpage?
Assume I have a webpage with the following structure: <div class="foobar"> .... <div class="blahblah"> ..... </div> sometext ....someotherelemens ... paste cut element here </div> Now I want to cut the element with the class="blahblah" (including its inner content) from its original place and paste it just before the closing </div> for the element <div class="foobar"> How can I do this with jQuery? If necessary the operation can be split into two jQuery statements. However a one-liner is preferred.
jquery load and the http 302 status redirect
I am trying to load some external html from a webpage that uses CAS Single sign on . the page i am loading it from is allready authenticated so the SSO method will redirect me to the CAS page <script> $(document).ready(function() { $('#content').load('https://uviewaccp.usask.ca/SASWebReportStudio/logonAndRender.do?&_sasapp=SAS+Web+Report+Studio&rsRID=SBIP%3A%2F%2FMETASERVER%2FAdmin+Unit%2FHR-AVPO%2FReports%2FADHA-1090+HR+Total+Rewards.srx(Report)&rsAM=pUrl #otvc100056_ComponentContainer'); });
jQuery Mobile Slider : Need urgent help.
We are working on an web application that includes quite a bit of graphics work around jQuery utilities such as jQuery mobile slider and other jQuery stuff. Can any one help to provide a fix/workaround for this particular thing. It’s about providing a comma separated currency text field in a built in JQuery slider text control. By Default its supports only normal integers and not supporting commas/strings. If commas are added tweaking the JQuery script, all the nearby images present in the jQuery
What does this mysterious selector do?
What's the difference between $.fn.insertAtCaret = function (myValue) // i saw this in an example, but don't know what it means and function insertAtCaret (myValue) // this doesn't work in his example but is similar to how I name functions I checked the jquery documentation for selectors but his selector isn't covered, so I don't know how he came up with it. It seems somewhat similar to jQuery.fn.extend() but he's not using .extend
is draggable widget deprecated?
It says (version deprecated: 1.12) on the page. So what does that mean? Am I supposed to do it some other way? I don't want to spend time learning something that is deprecated. I'd like to drag text inside a textbox to another textbox. Simple enough it seems, but yet I can find no way to do it. I see all these silly examples of dragging a picture into a div. Who does that? I could use some real world examples.
Live Search does not work with latest jquery version
Hello there, Long time ago i created simple live search. It works very well with jQuery v1.8.3, but does not work with jQuery 3.1.1. HTML <div id="searcher" class="flexcroll"> <a class="close">×</a> <form id="searchput" method="get"> <input type="search" value="" placeholder="Search..." onkeyup="search_movie(this)" class="co" /> </form> <div class="search_box"></div> </div> jQuery
how save hidden courses in variable removeid
I need when click on remove button hidden the courses removed then save in variable name removeid removeid will have courses be hidden when remove as example below my code as following in fiddle https://jsfiddle.net/0xfvzqxa/ suppose i have courses Id CourseName 1 c# removebutton 2 asp.net removebutton 3 javascript removebutton suppose i remove 2,3 that represent asp.net and javascript then removeid variable will have value 2,3 after click remove courses and be hidden
JPlayer playlist - need to move variable values from head to body
Hello Please check the code below defined in the head tag. I now need to move the myPlaylist.setPlaylist variable and from the head html tag into the body html tag., so I can change the playlist dynamically. Can you please advise? Why? - I'm using a DNN module and injecting dynamic data. Unfortunately I can only inject data via tokens into the body and not the head. Many Thanks... <link type="text/css" href="/script/jplayer/skin/pink.flag/css/jplayer.pink.flag.css" rel="stylesheet" /> <script type="text/javascript"
checkbox within widget-content
I am using a jquery-ui checkbox within a container that has class ui-widget-content on it. This is causing the ".ui-widget-content .ui-state-hover" css rule that defines the background property to override the .ui-icon-check rule that defines the correct background-position for the checkbox image. I believe this is because it is more specific. The result is that a checkbox within a widget shows the wrong image. How should I handle this? Here is a jsfiddle example. In the second div where I have the
Markercluster, google maps cant get location object
I want to make a markercluster, where i get my lat/lng values from my database. When i use this example here: https://developers.google.com/maps/articles/toomanymarkers Then those location values are objects and those are working. Now I have a loop where i create an array: lnglatarr.push({ lat: parseFloat(i[l].getAttribute("lat")), lng: parseFloat(i[l].getAttribute("lng")) }); // AFTER THAT i send the array to this function: createcustom (lnglatarr); Here the function function createcustom(arr)
sort horizontally by using jQuery Table Sorter plugin
How do I sort the values in a single table row? (i.e. sort horizontally) with the use of jQuery tablesorter plugin
google maps markerclusterer not working
Hello, i asked this already, but its not placed in this forum. Well, to make is very short. If i use this list of geolocations and place is hardcoded, it works: var locations = [ {lat: -31.563910, lng: 147.154312}, {lat: -33.718234, lng: 150.363181}, {lat: -33.727111, lng: 150.371124}, {lat: -33.848588, lng: 151.209834}, {lat: -33.851702, lng: 151.216968}, {lat: -34.671264, lng: 150.863657}, {lat: -35.304724, lng: 148.662905},
toFixed
i am facing one issue can u please help me.. 4.95.toFixed(1) if i do this one in console it is returning as 5 but i need 4.9 how to make it this?
JQ GRID PAGING TO SERVER SIDE.
Hi friends, I am using below code to load jq grid. How can I achieve pagging to server side. Below is my code. </script> <script type="text/javascript"> var firstClick = true; // << Outside the click handler $(document).ready(function () { $('#Button1').click(function () { jQuery('#dataGrid').jqGrid('clearGridData'); $("#dataGrid").jqGrid("setGridParam", { postData: { mfrmdt: document.getElementById('txtDateFrom').value, mTodt: document.getElementById('txtDateTo').value, mitem: document.getElementById('ddlItemCode').value,
How to Change Div Background Color When Div is Scrolled Top
Hi All, I've spent several hours to change the color of div background. My question is How to change background color of div when the div is scroll top ? Code var docInHeight = jQuery(this).innerHeight; var obj_div = jQuery('#div'); obj_div.scroll(function () { if (jQuery(this).scrollTop() == 0) { jQuery(this).css('background', 'red'); } }) Thanks in advance
Wont remove properties?
Hello Guys! I have created a calendar and i am currently trying to make the "Add Event" form as user friendly as possible. Like any normal calendar add page i have two input boxes for Date and two for times. Both using jquery Pickers. So i want to use the Duration property, this is the time picker i am useing http://jonthornton.github.io/jquery-timepicker/ So obviously i cant use this all the time unless the dates are the same, so i have wrote some functions to assess that, if they are the same it
mobile swipe detection
hey guys im using a plugin called bxslider and i'm trying to detect when a user swipes the divs. here are the versions i'm using...i have to use jquery 2.2.4 as the errors it creates with jquery mobile. jquery 2.2.4 jquery mobile 1.4.5 html <div class="internet_data"> <div class="slide slide-selected" data-value="1 GB">1 GB</div> <div class="slide" data-value="2 GB">2 GB</div> <div class="slide" data-value="3 GB">3 GB</div>
Using multiple date range pickers on same page
Hello! I'm using the JQuery datepicker with date range. So I have two input fields with a from-date och a to-date. The problem is I can only have one pair. I want to have several date pickers on the same page. How can I do that? Thanks in advance!
Save position of draggable item
Hi there, I have looked through these threads and can see this question has been asked before, however i am unsure how to implement the answers to exactly what i need. Here is the link to what i have so far: http://mereton.com/dragtest/drag.html When users of my site drag the items around, and then refresh or leave and return to the page, i would like those items to remain in the same place. Is this possible and if so, as i am a bit of a newbie i would really appreciate to know how to apply it to
Hide an element with jQuery/javascript when the user is logged in
Hi All, I would like to hide a menu item when the user is logged in already, here is my code but it doesn`t work properly: I am checking if the user is logged in - (the top line works as it displays the alert message if I add one), but for some reason it doesn`t hide the menu item and the megamenu looks messed up when the user is logged in. What would be the correct way to hide it? Thank you function hideing() { if ($('#dnn_dnnUser_enhancedRegisterLink:contains("SuperUser Account")').length > 0)
How to set a default value with $(selector).val()
Hey, is there any way to set the default value returned by $(selector).val() while the object (text, textarea...) has no value? What I mean is the way something like below: $(selector).val().setDefault('myDefaultValue'); Right now the only way is doing some little overcode like: var value = ''; value = $(selector).val(); if (!value) { value = 'myDefaultValue' } Cheers Andrzej
My input fields disappear!
I have the following form: 7 <form method="post" action="/register"> 8 <input type="email" name="EMA" required> 9 <button type="submit"</button> 10 </form> which I validate like this: 281 pricing.find('.SignUp form') 282 .ajaxForm(payment) 283 .validate({}); but when I enter "x" (invalid) into the e-mail field the system displays "Please enter a valid e-mail address" and destroys my input field (I'm no longer able to enter information because the field is no longer
Datepicker - Select a Date Range
Seems simple enough but not able to do it. Datepicker - Select a Date Range - From Field click a date and then To Field should auto populate to next day eg. From Oct 15, automatically To should go to Oct 16. Thanks in advance Pete
Droppable to specific locations
I'm trying to convert my Adobe Flash game into HTML, but not having luck. Can anyone steer me in the direction of a script for droppable boxes into specific targets? It's a lowercase to uppercase matching game so the box with "a" can only be dropped on "A". I can get all the little parts going, but any box can be dropped anywhere now.
Dynamically loaded page
I have a page index.php where I have jquery being used. One of the uses is to call another page. When that page is called and loaded I want to use jquery from index.php? Maybe even do a ready event. How can I do this from my ajax loaded page?
jquery -changing css property and repeating
Hey, so I have this sprite sheet http://codepen.io/benasl/pen/yabpxo that I want to be changed to another one after it ends, and after the second one ends the first one needs to start again, and so on... I managed to do this with just changing css properties, but now how do I make them loop?
Tab navigation freezes other tabs if going forward but not backwards
We have a large web page with 15 tabs. 4 tabs were recently added. Some of the tabs have a page of data appear when selected. The new tabs have forms that when filled in use an AJAX call to get data to display in a in a Jquery table. We noticed if a select a tab and then go to the next tab (on the right), It is is broken(unresponsive). The strange thing is if I start with the tab on the right and go to that tab (that broke above) it is OK.
touch punch customization
Hi guys, I'm New is there anyone among you who could help me in the integration of touch punch on a web appication? I am not very good at js.... the site is developed in codeigniter and I'm taking care of the frontend part ... but I can not implement touch punch to resize and rotate on mobile devices ... currently the sistempa is a bit uncomfortable for mobile devices ... thanks... the site is http://www.coverdesign3d.com/design/index/77-cover-samsung-s6-edge
wat is this??
how to use query sting
Populate span tag(s) with data from a json file
On THIS page, I have listed some dummy estates and hard-coded, for each one, a span (with the text "VEZI TELEFON") that when clicked, reveals a phone number. I want every phone number to be retrieved from a JSON (or PHP) file called telefoane.json that has the content: {
"telefoane":[{
"id":"1",
"tel":"0743127315"
},
{
"id":"2",
"tel":"072245875"
},
{
"id":"3",
"tel":"0756129458"
Popup menu popping up in wrong place on Android!
I have a popdown menu in the header. On iOS it works perfectly. On Android... well... if you push the menu button some random number of times the MIGHT eventually popup where it's supposed to. It does always popup (generally on the opposite side of the screen) and when its up none of the selections are clickable but instead just dismiss the menu. Here are the files I'm including: <link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.4.5.min.css" /> <script src="jquery.mobile/jquery-2.1.4.min.js"></script>
How to check the entered data exists in database or not?
Dear Team, Greetings. I want to validate the one field with my mysql database. I am having one filed with hotel_name and i want to check that the entered hotel name is already exists in database or not. I am using Bootstrap, JQuery and PHP ad below is my code JQuery Code:- ------------------------------ $('#form_add_hotel').bootstrapValidator({ message: 'This value is not valid', live: 'enabled', feedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon
call function without using firbug
I am getting problem to debugg window.location() without using debugger. This is working while i am using firbug.... plz help me
Jquery1.7 Scheduler issue
Hai, I want to use Scheduler in my application, which version of jquery is supporting scheduler ?
jQuery drag and drop issue
I am facing a couple of issues with jQuery drag and drop.Below is the link to my code https://plnkr.co/edit/uKs7FHvVQqSizcig7sP8?p=preview Issue 1: On chrome, after drag, the dragged element is NOT draggable anymore, but rest all elements are. For instance, say, if I drag "Test1" over "Test 3", then after the drop, Test 1 is not draggable but other elements are. It happens every time with the dragged element Issue 2: Though it works on Edge, it doesn't work on IE at all. Once dragged element is
jQuery bug - height() calculates rounded values
Hello I found a bug in jQuery today. the height() attribute calculates rounded off values mostly. am i right in thinking so?
Code getting triggered over the wrong element
<li class="fa fa-plus fa-fw menu-parent"><a href="#"><span> Productos </span></a> <ul class="menu-child"> <li class="fa fa-gift fa-fw"><a href="?mod=products"><span> Productos </span></a></li> <li class="fa fa-server fa-fw"><a href="?mod=products&action=categories"><span> Categorias </span></a></li> <li class="fa fa-apple fa-fw"><a href="?mod=products&action=brands"><span>
More DIV-Boxes one Function - How to do
Hello! I'm starting with JQueryUI, but i have a Little understanding Problem how the draggable-function works with more div's... I have this Code, and it will work well for Box1, but not for Box2. How i can define the function so it will work also for Box2 ? <script> $( function() { $( "#box1" ).draggable({ containment: "parent", scroll: false, snap: true, snapTolerance: 5}); $( "#box1" ).resizable(); $( "#box1" ).mousemove(function(){ var coord = $(this).position();
Next Page