.html() can put an id inside and use it
I have a id inside the .html(<div id="foo"></div>). I trying to use the id to call a function. is suppose to work?
Duty calendar
I have seen tutorial about jQuery PHP calendar, but have questions about customization this idea. I am making duty worker calendar with administrator interface. The differences between event calendar are: no events, only people->day date correlation, no hours correlation, the duty staff work whole day. I am not sure about my MYSQL database architecture, at current moment there is ID Name 1 <- these day dates, that i fill specific key (coz duty worker could be Sick (S), Weekend(W) ,on Duty(D) for
Running photocradle with jQuery and Asp.net
I am trying to generate a photocradle slideshow inside the jQuery function by instantiating a div and calling photocradle to generate the photocradle slideshow with the photocradle class in div. It works when I place the code after the closing </form> tag and before the closing </body> tag in the aspx page, but when I wrap the code inside a secondary function such as $(document).ready(function () { function myfunction(){ rest of the code... } });. The photocradle slideshow no longer shows up. What
i want to access jquery from parent
hi , I have one html page in that I have added jquery reference. like <html> <head> <title></title> <script src="jquery-1.11.1.js"></script> <script> </head> <body> <iframe src="iframe.html"> </iframe> </body> </html> in iframe i want to access jquery from parent. i have not added any reference in iframe page. it is possible to access parent jquert in iframe page. I tried it. using window.parent.jquery , window.top.jquery, window.jquery.noConfliction() to search
Timing subscribe popup with jquery
hello guys i new with jquery i there any way to add a new popup with timing for subscribe forms for my users ? i use bootstrap frame work , i wanna add a popup for my user that are coming to my site fdmusic and tell them to subscribe to my newletter ... please just give me a code that is easy , i wanna show popup 1 in 7 days with time for ip , when ip chages i wanna show it again ... thank you so much my website fdmusic.net can any one help me ?
on ready jQuery function with javascript function for onclick
I am trying to run the jQuery function with a button call but non of the options seem to be working so I resorted to using javascript function in the end so I can use onclientclick to call it. The problem is. $(document).ready(function () { my_fun(); my_fun1(); }); This works, but $(document).ready(function () { function script2() { my_fun(); my_fun1(); } }); The second one doesn't
I am having some trouble.
I am trying to hide a div once the screen size reaches a certain point but it does not seem to be working. Here is my javascript. if($(window).innerWidth <= 768px){ $('#id').hide() }
How to get particular href?
<a onclick="return false;" target="_blank" href="15" id="accounting_send" class="glyphicons no-js book"><i></i></a> <a onclick="return false;" target="_blank" href="16" id="accounting_send" class="glyphicons no-js book"><i></i></a> <a onclick="return false;" target="_blank" href="17" id="accounting_send" class="glyphicons no-js book"><i></i></a> $("#accounting_send").click(function () { var docID = $(this).find("a[href]").attr('href'); console.log(docID);
.on not working after .off
Dear All I am using following code for mouse enter and mouseleave effect $('.basesmall').mouseenter(function(){ $(this).find('img').stop().fadeTo('slow', 1); }); $('.basesmall').mouseleave(function(){ $(this).find('img').stop().fadeTo('slow', 0); }); Basically managing the opacity of image residing inside the div when mouse is entered, the opacity is full and when mouse leaves, the pacity is zero (not visible) On click i want to keep the image visible In order to
jQuery Slide Toggle Affects Multiple Divs
i'm currently trying to implement a slide toggle on a repeatable block of code. Once the trigger is clicked it opens up a comments panel. At the moment it is opening all of the panels. I have JSFiddle here http://jsfiddle.net/qkhq0qt4/ if you click in the box where it says 2 comments you will see it opens both divs i need it to open only the one that is clicked. help much appreciated.
$(this) context
What I'm trying to do is changing the text of a div when pressing a button. Since the button is inside a div that's inside the div I'm trying to change the text of, I did this: function changeQuan() { $(this).parent().parent().text("lel"); alert($(this).parent().parent().text()); } The alertbox itself shows up, but there's nothing inside. When alerting without .text() it returns an object, so I guess this should work, but it doesn't. The divs and buttons are inserted with php: $output
Load help
Struggling to find a way to do this. I have an html table that is loaded from the database whenever a new user logs into the site. What I need to do is refresh the data in the html for all logged in users when someone new logs in. Then all logged in users will be able to see the latest list of logons. Here's the table code for reference: <?php if ($ncs_callsign != 'NONE' && $_SESSION['User_Callsign'] != null) { // The Monitors table echo "<div id=\"scroll\">"; echo
navigation highlight script difficulty
- I have been playing around with the below peice of code for a while now $(document).on("scroll", onScroll); //smoothscroll $('.navbar-nav a[href^="#"]').on('click', function (e) { e.preventDefault(); $(document).off("scroll"); $('.navbar-nav li').each(function () { $(this).removeClass('active'); }) $(this).addClass('active'); var target = this.hash, menu = target; $target = $(target);
jquery help
hello, i am using jquery slide down effect on my webpage and it get loaded when my document is ready but i want it should appear when my mouse scroll on particular element, how to do that?? can anyone please help. Any help is appreciated. Thanks
Where are my other .inner elements?
I am brand new to this...just learning this weekend. I have this section in my html: <div class="inner" id="hello">Hello</div> <div class="inner" id="goodbye">Goodbye</div> <div class="inner" id="aloha">Aloha</div> When I run this jquery: $('.inner') ...I only get back the first element with id='hello' Shouldn't I get all three? Thanks
Linking screen keyboard with Mailchimp form
Hi! Im just getting started with jQuery, and already ran into my first problem. LINK: http://onelan.grafikomudv.dk/keyboard/ I've got this keyboard that fills out the 'Dummy' field perfectly. And I want it to do the same with the Mailchimp form above, so I can delete the 'Dummy' field. Can anyone provide help? I tried change the selector but without any luck. Thanks!
Comparison help
I sure don't understand what is going on here. This is driving me nuts. First, here's the code: <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> $(document).ready(function(){ var ncs_callsign = <?php echo json_encode($ncs_callsign); ?>; if (ncs_callsign == 'NONE' || ncs_callsign == null) { $("#nav_bar li:nth-child(3)").hide(); $("#NOW").hide(); $("#NCS").hide(); }
auto suggestion jquery ...how to store the id
Dear sir following code fills up the autosggest field and Click on name or selection I want to store the id of the name selected in other filed so as to use it while storeing the details. My html code <div class="label_div">Type Category</div> <input name="category1" type="text" id="category1" value="<?php echo $_POST['category1']; ?>" size="35" onkeyup="categoryscript1()" /> <div class="input_container">
Checkbox help
I have a checkbox like this: <input id="box" type="checkbox" name="logger" value = "YES">Uncheck this box if another ncs is logging for you<br> Trying to set it checked like this: <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> $(document).ready(function() { document.getElementById("box").checked = true; } </script> After this works, which it doesn't now, I'll put in conditional statements to check or uncheck it. That's why
call function with parameters
$('#'+mobilecheckdiv).load(url,data ) ; // populates data in this div -> works fine $('#'+mobilecheckdiv).load(url,data,remark ) ; // calls function remark after completing loading the output in div 'mobilecheckdiv' -> works fine In this case I am caling a function remark without paramter However $('#'+mobilecheckdiv).load(url,data,remark(chkdivname,n) ) ; // Call function remark(chkdiv,n) i.e. a function with parameters is executed before loading the div with Data How can I
Transform jquery variable in text
Hello, I have this very short code to obtain latitude/longitude : <div id="infoposition"></div><br> <script> function maPosition(position) { var infopos = "<br>"; infopos += "Latitude : "+position.coords.latitude +"<br>"; infopos += "Longitude: "+position.coords.longitude; document.getElementById("infoposition").innerHTML = infopos; } if(navigator.geolocation) navigator.geolocation.getCurrentPosition(maPosition); </script> When I open my file I obtain this : Latitude : X.1202949 Longitude:
link changes classes and shows div/span
hello, i want to make a page with 2 areas. on one side there are some links, on the other, there is some content. i want to change the link color (css class) and in the same time to make something show up. actually i have now this: $(function() { $( '.nav span' ).on( 'click', function() { var showc= $(this).attr('rel'); $( this ).parent().find( 'span.active' ).removeClass( 'active' ); $( this ).addClass( 'active' ); $('.content span').hide();
How to create a slider like this from scratch ?
hi guys, I came across the slider used in http://www.iconnect-design.com.au/ web site and i like to create a similer one but i want the text and images to move from top to bottom.. hope some one could help me to create one like that from scratch with jquery.. thanks in advance !!
pop up and validate
I have the link opens this is the pop-up page where user needs to update the lotNo into the text box. Once they enter the number in, hit update and close this pop up page. I've tried to enter 50, got the message "Please enter a value less than or qual 30" which is correct since the max is 30. However, it's still let me hit the update button? the button can't submit w/o enter the correct number, is there the way to disable or hide the submit button if form validated is failed? Please help
Cycle hover on mouseout
Hi, I was wondering if someone knows how the Cycle plugin works. Is there a way to restart the “slideshow” by fading to the first image on mouseout (instead of pausing)? jQuery(function($){ $(".slides").cycle({ fx: 'fade', speed: 450, timeout: 5, startingSlide: 0, }).cycle("pause"); // Pause & play on hover $(".slideshow-block").mouseover(function() { $(this).find(".slides").addClass('active').cycle('resume'); }).mouseout(function(){
v
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>404 - PAGE NOT FOUND</title>
<!-- Add Slide Outs -->
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="/cgi-sys/js/simple-expand.min.js"></script>
Is there any limitation in SelectMenu option while preselecting?
Hi there We have this script (settings.html) that has Ajax (Jsonp) calls for GetCountries and GetZones (time zone) to populating the Country and Zone list for the user detail which is also another Ajax called for GetUser. GetCountries returned 252 records with CountryCode and CountryName. GetZones returned 415 records with ZoneId and ZoneName. User detail obviously returned user detail with CountryCode and ZoneID for that particular user. The population of the Country and Zone options in Select
Hello all
is there any minified jquery plugins for all function...Like fancybox,slider,etc...all in one jquery lib..
Ajax return only first value?
$.ajax({ type: 'POST', url: 'add_doc/getProtocolData', data: { 'client': client, }, success: function (html) { $("#protocol_data").html(html); $('#protocol_data #protocol').live('click',function () { var numberDoc = $('#protocol_data #protocol').val(); console.log(numberDoc);
Can i store http://api.jquery.com/ on my local computer I.E on my local hard disk .
Well my question sums it up . actually i often find http://api.jquery.com/ , to be quite a great resource , so i'd like to have it locally on my system . is it possible ?? if it is , it would be of great great help . it might sound a bit odd that i want the entire website to be accessible locally , but its necessary due to some reason . well , tats my only question . Thanks .
Selector help
Need help selecting a particular element of this nav bar: <nav id="nav_bar"> <ul> <li><b><a href="ncs_login.php">NCS Login</a></b></li>" <li><a href="net_login.php">Net Login</a></li>" <li><a href="maint_login.php">Maint Login</a></li> </ul> </nav> Tried this to hide the first element : $("#nav_bar[ul][li][b][a]").hide(); and it didn't work. If I just use #nav_bar, of course the whole nav bar gets hidden. How can I select just that one element? Thanks for any
Menu PopUp
Hi, I am new to JQuery, i had a requirement to develop a menu and on mouse over on menu items i need to get popup (its not drop down please).I am able to get popup ,it is getting disappear before control is transferred . can any one help me on this. My code: <li class="green" id="notification_li"> <a href="#" id="Link">Notifications</a> <div id="Container"> <div id="Body" class="Body"> <af:panelGroupLayout id="pgl1">
Changing when the navbar item is highlighted
given the following : Js fiddle i want to change when the menu item highlights . i.e. i want the menu item to highlight when i am i am about 80 pixels from the next div . I have checked stackoverflow for a few issues like this , but none seem to solve my problem .
condition
Hello, this jquery works without any problems, but i want to add a condition that it only toggles the <tbody> when i click on the <td> with the class="check", not with the whole <thead>. thank you for your help! <script> $(document).ready(function(){ $("thead").click(function(){ $(this).next().toggle(); }); }); </script> </head> <body> <table border=1> <thead> <tr> <td>Name</td> <td class="check">Vorname</td> <td>Alter</td> </tr> </thead> <tbody style='display: none;'> <tr> <td>Schmidt</td> <td>Klaus</td>
validate the number
Hi, i have the field where the user needs to enter the number in. How's can i validate and make sure the number < 30? Not sure how to add the syntax to the code below for this validate, please help? $(document).ready(function() { $( "#getpo" ) .validate({ rules: { supplier_No: {required: true}, lot: {required: true, number:true} } }); }); Thanks
Need help with my code
$(document).ready(function(){ var x = true; $("#Menubutton").click(function(){ if (x == true) { $(".DropDown").slideUp(1000); $("#drop2").slideUp(1000); alert("true"); x = false; } if( x == false) { $(".DropDown").slideDown(1000); $("#drop2").slideDown(1000); alert("false"); x = true; } }); }); To my Problem I want to click on a button (div) and want to slideUp a div. And when i click it on the second time i want that it slide down. Have anybody an idea how i can solve my problem? Thank you
Need help with Tabs
Hello, Can someone please tell me how to make this tabs work, > http://jqueryui.com/tabs/ < I copied the code but it isnt working and i dont know what to do now, i normaly work only with html and trying to learn css. what do i need to do to make the tabs work. thank you
removeClass not working
Hi, i am trying to reverse an animation using removeclass and it does not work. As I'm quite new to jquery I suppose I am missing something obvious - maybe someone can help. There is this small window <div class="fenster f15"> <div class="flap"> </div> <a href="http://whatever..."><img class="button" src="button.jpg"/></a> </div> which is opend by $('.fenster').click(function(){ $(this).addClass("opend"); $(this).children(".flap").addClass("flap_open"
modern repeater pattern for ui elements?
Hello, 10 years ago, the standard repeater pattern for UI elements, at least in the .NET world, was to use a unique id for each element. For example, a repeating list of myfield inputs, by default, would have unique id's like myfield_1, myfield_2, myfield_3, etc. A coworker who specializes more in front end js implementations suggested that a more standard approach these days is to use html5 data attributes. So instead of accessing the repeater fields by unique ids, it would be better to access
Need help with Drag and Drop Function and Button
I am not sure this is the right spot but im a newb at Jquery and this is Mobile. I had to build a small functioning page to drag and drop items for class to demonstrate an idea on my Thesis. Here is my problem. When on mobile click on the test page below. you will see you can drag and drop the cats anywhere. Then there is a button at the bottom of the screen. Here is what I want and cant figure out. When the Button is tapped it will turn Green or Gray. On Green you can Drag the cats. On Gray I would
Next Page