Help with a navigation bar.
Hi. This might of been asked but I couldn't find it. I'm new to web design. I have a navigation bar that's horizontal on large screens and when the screen size gets smaller, it changes to just say Menu and it adds a button with three horizontal bars that the user can click. When they click, the menu links are supposed to come out from the side. I'm having trouble with that part though. I'm using jQuery and don't know what's wrong here. The menu comes out when the user clicks or hovers, like
New to jQuery: How to set cookies for stylesheetswitcher?
Hello, I'm new here and I'm learning jQuery :) Code of the switcher: google.load("jquery", "1.3.1"); google.setOnLoadCallback(function() { // Color changer $(".colorblack").click(function(){ $("link").attr("href", "app/tpl/skins/DarkFlat/style/black.css"); return false; }); $(".colorblue").click(function(){ $("link").attr("href", "app/tpl/skins/DarkFlat/style/blue.css"); return false; }); $(".colorgreen").click(function(){
Transitions between views in one page backbone app - jQuery Css3
I want to use some jQuery Css3 transitions like this http://designdrizzle.com/15-amazing-page-transitions-effects-tutorials-in-jquery-and-css3/ in a one page backbone application but I don’t know from where I have to start. Do I need to alter the way I represent all of my views (at present a typical swap view) to get effects? Also, I want to learn 3D thumbnail hover effects with CSS3 and jQuery 3D variations I am a newbie into front end development, so want some help.
jQuery 2.1.4 bug
I have noticed that their is a bug in jQuery 2.1.4. I have made a code through which checking a main checkbox checks all the checkbox in the table. The code works for the first 2 click but does not work from 3 rd click . The code works correctly when i use jquery 1.4.3. You can see the page online at - http://www.yogihosting.com/check-uncheck-all-checkbox-using-jquery/ the jquery code is - <script type="text/javascript"> $(document).ready(function () { $("#mainCheckBox").click(function
Loading script through .load
I have a foreach loop that echoes all the comments, I also added a trash icon so the user can delete them, the problem is that I want the icon to be shown only if the user that wrote the comment hovers on it. Of course when the page is refreshed it works well, but since I'm using Ajax to update the comments on live I'm using this code to update again the loop -- " $( ".test" ).load('../home/{{$image->id}} .test'); ". I'm well aware that in this way scripts won't load, I would like to see if there
Return some html garbage from ajax call
I use the following code that ends up with"success" but the return data is as follows(see the red text): (it continues and I truncated, but I beleive you can get the idea). The real data that is beeng echoed from the php is "abc" " <br /> <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'> <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined
HTTPS blocking access from jquery.com/mobile/
Hi all, I was working on a site and experimenting with query.mobile. on my home test server all was working - but when I put it on the main server the query.mobile stopped working. I think I have it tracked down to the SSL cert - https When the .htaccess file is taken away and I view site on HTTP not HTTPS then it works but the HTTPS seems to block the header lines below..... Q: any idea how to fix these links? these are not a problem I think (on my server- not cloud) <link rel="stylesheet"
Simple jQuery Image Slider
Hi everyone i made a Simple jQuery Image Slider with 3 pictures after it gets to picture 3 than it stop. how do i code a simple image slider with autoplay? i appreciate your help bye
"Uncaught Unexpected literal at position 2" from MultiDatesPicker Plugin
I am using [MultiDatesPicker]( http://multidatespickr.sourceforge.net/ ) plugin in my Rails project. My goal is to do an Ajax call and then get the dates which needs to be disabled. After that, once I will click any enabled date it should select a range of date as per the Ajax response `interval`. Here is my code : $(function() { $(document).on('change', '#booking_package_type', function() { var bol = $.inArray( $(this).val(), [ "weekend", "full_week", "midweek", "" ] );
Jquery Help
Hi, I have incremented divs in jquery via plus minus. Inside a div there is a textbox which opens up another textbox, the problem is when i click in that textbox all textbox open and not on that particular div. A fiddle to explain: http://jsfiddle.net/LknLr2am/
Ask user to Save before leaving asp.net page
I have a lab report application built in ASP.Net with C#, with multiple pages in it. Each page can have 5 to 8 data entry sections, each with their own Save button. I am trying to make sure the user saves their entries before changing pages, going to a different site or closing the browser. I found this script, which almost works, but also fires whenever I select one of the Save buttons on the page, thus preventing the user from saving. I am very new to JQuery and need to know how to tell this script
how to fix table cell's height and width fixed
Please find the fiddle below, http://jsfiddle.net/raving/3Lvth1dn/6/ When i am creating a 4x4 table the height and width are same, but when i create a table of 2x3 the cell's height and width is changed. Please let me know how to fix the cell's height and width irrespective of number of rows and columns entered. Thanks in Advance
Searching for multiple items from a list in a second list
I have the following code... if ($("#filter_chemistry").val() != "") { $("td.polymerTypel").not(":contains('" + $("#filter_chemistry").val().toLowerCase() + "')").parent().hide(); } Where #filter_chemistry is a form text field, and the td's with the polymerTypel class will contain a list of items similar to st,ac,bde,va for example. If I enter "ac" into my text box, all table rows NOT containing ac in the list will be correctly hidden, all good so far. What I want is to be able to enter ac,va into
empty event
Hello, I'm working with jQuery 2.1.4. My web application uses different div tags and on one div tag there is called empty() from different modules. In my main module I would like to get an event if any submodule calls empty on my div. In code it should be: jQuery("#mydiv").on("empty", function(event) { console.log("div is cleared"); }); and on submodul jQuery("#mydiv").empty(); How can I do this? Thanks
Updating totals with dynamic data using jquery
Hi The following table row repeats on my dust template, usually up to 10 or so results. Each line has a quantity selection. I would like to update the total in the last cell of the row with the quantity * the price on the current table row. Is this possible and what is the best way to do this? Thought I would ask before I wasted too much time trying the wrong thing :) Thanks. {#Lifts[0].Result.Items} <tr> <td> <h5 >{AgeCategory}</h5> <small >Ages {MinimumAge} - {MaximumAge}</small>
A relative jQuery beginner got stuck making a simple game
Everything's resolved. It was a typo in a function. Thanks for the effort.
Why did this method stop firing?
I have this method: /* This causes the textbox to grow dynamically (vertically) as text/rows (lines) are added */ $("[id$=explainPaymentTextBox]").keyup(function (e) { while ($(this).outerHeight() < this.scrollHeight + parseFloat($(this).css("borderTopWidth")) + parseFloat($(this).css("borderBottomWidth"))) { $(this).height($(this).height() + 1); }; }); ...which was working fine (causes the textbox to grow vertically as necessary so that all text entered is visible), but all of a
Why do my page sections play whack-a-mole on me?
I've got a web page (Web Part, to be more specific - this is a Sharepoint 2010 extravaganza) that morphs based on who is using it. This simply means that if you are in the "for someone else" category, you will see the entire page, but if you are in the "for self" category, you will see a subset of the page - certain sections will not be shown. The user self-identifies as to what type of user he is. The page begins with a default "for self" scenario (two sections are not shown unless they define themselves
How to use jQuery to get scrollbar thumb positions
In my application, I need to be able to set the horizontal and vertical scrollbar thumbs manually to ensure the visibility of certain elements on my page. Imagine I have a <table> with many rows, enough so that a vertical scrollbar becomes necessary. Based on the user's input, my goal is to automatically position the vertical scrollbar thumb in such a way so that the row with the TARGET texts gets positioned center vertically. In my code snippet below, I use a button, but in actuality, it will be
highlight row on click with multiple tables
Hi I have a fairly big table and I am using the code below to highlight the row on click, if I click on another row it removes the first highlight and highlights the new row, it works fine, The scroll/Ajax code is JScroll (jscroll.com) Now the problem, I now only load the first x number of rows, then use a jquery script that loads more rows when I scroll down, it requires that the table is in a div, and the new rows are appended to the div on return from the script. Because of the way it works, I
understanding John's class inheritance
hey guys i was just going to john R's post here and he talks of a pattern he found that looks like below : var Person = Class.extend({ init: function(isDancing){ this.dancing = isDancing; }, dance: function(){ return this.dancing; } }); var Ninja = Person.extend({ init: function(){ this._super( false ); }, dance: function(){ // Call the inherited version of dance() return this._super(); }, swingSword: function(){ return true; } }); var p = new Person(true);
TypeError: Converting circular structure to JSON
i got error message when posting data through Ajax TypeError: Converting circular structure to JSON $.ajax({ "url": "http://www.test.com", "crossDomain": true, "type": "GET", "dataType": "jsonp", "jsonpCallback": "mycb", "data": { "email": "xyz@test.com", "name": "amit", "url": "http://www.test.com/"
jquery not working in localhost
hi guys i would like help with this jquery code the effect does not appear in localhost browser. here are my files. index page <!doctype html> <html lang="en"> <head> <link rel="stylesheet" type="text/css" href="css/contain.css" > </head> <body> <p><input id="search_name" type="text"/></p> <ul id="names"> <li>Andrew thiarara</li> <li>Paul thiarara</li> <li>gmoney thiarara</li> <li>cecel thiarara</li> </ul> <script type="text/javascript" src="js/contains.js"></script> <script type="text/javascript"
document ready function
Shoud I place every code written in jquery into a document ready function? Every or there is some exception? Thank you. Next question is : can jquery code without ready function cause slow rendering page? Thanks
Returning value from AJAX call
Basically, im trying to write a script that uses AJAX to verify if a username exists. Depending on the response from the AJAX call, it should return true or false. I know I can accomplish this by doing async:false, but thats a no no. Heres a basic version of the script: function whatever (username) { var result = true; $.get( "/account/check_username/" + username, function ( response ) { if($.trim( response ) == 'Exists') { result = false; } } ); return
Switch between hover and click events, depending on window width
I have made an HTML5 responsive, 2 levels menu you can see HERE The wide screen version shows submenus upon hovering over the main menu items; the narrow screen (less then 800px) version shows submenus upon clicking the main menu items. The problem is that, if I resize the window, the switch between hover and click events does not happen properly. Of course, I want the menu to react at click on mobile devices... What shall I change in my script? Or is there an already made solution that I can use?
Syntax
forexample in Mozilla Developers its written: Syntax arr.forEach(callback[, thisArg]) i know forEach usage etc. but i dont understand the way it declares the syntax its written like [, ] what does callback[, thisArg] mean? why it opens the bracket, puts comma and closes bracket after thisArg ??? in fact i cant learn forEach syntax and usage by the way its declared 8-}
Run PHP with JQuery Progress Bar
Hi, As an example, I have customers in my database. I want to check the numbers of the customers using check_total_number.php then after getting the value I want to run update_customer_data.php but with showing a progress bar for that number of customers. How can I do that using $.ajax? Thanks, Jassim
Failed to execute surroundcontents on selection containing span tag
I am trying to color the background of a user text selection with two colors according to his choice with the option to change the color of an already colored selection. I use jquery and html to generate span tag . the problem I encounter is when the user want to change a already colored selection example: colored selection text0 text1 text2 text3 with color1 <span class= color1> text0 text1 text2 text3 </span> text4 text5 text6 user select text2 text3 text4 to color it with color2, this var newNode
Using URL Parameters
I am using some URL parameters in my jQuery and have come across a bug. Since JS is not my primary (or even secondary if I'm honest) language I am at a loss to know why. I have the following function. function urlParam(name){ var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); if (results == null) { return null; } else { return results[1] || 0; } }; I then call this with the following lines (much reduced for debugging)... var urlProduct = urlParam('product');
Question for confirmation : are DOM changes applied immediately ?
I've got a weird case of adding an HTML fragment from an Ajax call does not seem to have happened immediately. In the done() callback the fragment is appended into an element and some subsequent code is executed. The code fails because it doesn't seem to find the added markup. And indeed, when pausing the execution, the markup is not present yet. However, everything works when the code is scheduled in a timeout of zero ms. Maybe some kind of precedence in the rendering process of the page. I'm pretty
How can I get a hidden HtmlTableRow to display?
I am creating some html elements via server-side (C#) code. Since this is a jQuery forum, I won't show that code, but it adds a column caption row and a first row of "textboxes" that are visible; then, I add two more rows of textboxes that start off invisible. I additionally (no pun intended) have a button (with the caption "+") that should make the first invisible row visible on the first click, and the second invisible row visible on the second click. I'm trying to accomplish that with this jQuery:
Click event for dynamic checkbox not working?
http://jsfiddle.net/au901wLt/1/ Click event for dynamic checkbox not changing value?
Ajax url error
Following is a snippet of ajax code which works fine if the call is made from home page. If I use it in another page I get 404 error code regarding the "url:" option. As seen from the code the url is "wp-content/plugins/myplugin/build_responsive_css.php" In case of another page say "page1" I get the following error in the Chrome consol: page1/wp-content/plugins/aaa-responsive-design-helper/build_responsive_css.php 404 (Not Found) How can I solve that? Regards I. Sher
Uncaught ReferenceError: jQuery is not defined
Hello guys i am using jquery in python but i cant resolve this error need help
How to calculate the difference between two cordinates
I need to calculate the difference between the two co-ordinates as mentioned below. The values are left and top positions Starting Coordinates : 8 , 115 Ending Coordinates : 168, 115 Difference is : 160, 0 and then i need to divide it by 40 So my final result will be : 4,0 Please let me know how can i do it in Jquery.
Getting div top position
Hi, I need to get a div's top position that has the following css - #bodyDIV {
position: absolute;
width: 80%;
height: 80%;
bottom: 10%;
left: 10%;
background-color: #808080;
border-radius:3px;
} The following code return "auto" mydiv.css("top") What is the right way to get the actual div's top position ?
How to et the current end points of svg path?
Hi all there is an example of how to draw a svg path (and others) while I am scrolling - link . So there is a path rendered in svg. At the beginning that path is not rendered. Just as I am scrolling it is rendered step-by-step ... so how can I get the current position of last points [ x,y ]? I hope you understand what I want and thank you for answers.
Replacing substrings in a string to a common string
I have a string that contains few substrings separated with spaces. I want to replcae all spaces with a two character string: " -" (space with hyphen). example: original string : "aaaaa bbbbbb abc" required string: "aaaaa -bbbbbb -abc" I tried javascript replcae but it doesn't work. Can someone help please? I. Sher
Get json data into a DIV
Hi, I am trying to populate data from PHP into a DIV using PHP and JQuery. I am using below code and I am getting the data into the console but I want to ask how can pick a specific field name, e.g first_name or last_name in order to format it in the DIV. This is the PHP: $find_contact = $_POST['txtFind']; $mysql_query = $mysql_connection->prepare('CALL sp_find_contact(:param_find)'); $mysql_query->bindParam(':param_find', $find_contact, PDO::PARAM_STR); $mysql_query->execute(); $result = $mysql_query->fetchAll(PDO::FETCH_ASSOC);
Next Page