Get the ID of clicked on & lt; li & gt;

I have a dropdown list of items: <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Räume <span class="caret"&g

Datatables - dynamic columns

I understand that this question has been asked before, but my variation does not match the other answers. I have a json data source in this form : { "columns":[ {"title":"Store Number","data":"StoreNbr"},

How to correctly configure CORS on IIS?

I've recently started working on an a PhoneGap mobile application that will authenticate and work with ASP.NET WebApi web services. One of my issues early on was to enable CORS in IIS using a setting in web.config: <system.webServer> <httpProtoco

In the for loop, why does i ++ go to 1 after the second use?

Why does my var i in for loop change from 0 to 1? This line: for for (var i = 0; i < siteDatabase.length; i++) increments 0 to 1 ?in the first loop? which then causes siteDatabase[i] to access element at index 1 instead of 0. I thought i++ increment

fill a selection list from JSON

I am receiving some JSON data as follows: { "COLUMNS": [ "COMP_ID", "COMP_NAME", "FIRST_NAME", "LAST_NAME", "EMAIL_ADDRESS" ], "DATA": [ [ 68, "Comp Name 1", "Nicole &quo

The Jquery script does not fire

I am new to jquery usage. I have reproducing a working example from internet for filtering table row using jquery. The table contains 2 columns and corresponding values in it.But When I run the program using jquery to filter the row after following t

debugging the jQuery snippet

I was trying to take a working jQuery snippet (it's an example to another SO answer) and improve it. The original snippet can show a good and a bad way of doing something, by having to comment/un-comment some code. I tried to modify the HTML and the

Switch Modal Bootstrap with php trigger

I need to trigger a Bootstrap modal if a PHP GET url is set but I don't know how to. The PHP code look's like this: <?php if ($_GET['activate']) { $activate = $_GET['activate']; mysql_query("UPDATE `users` SET `active` = 1 WHERE `email_code` = '$a

How to create a paragraph on entering a contenteditable div?

I'm making a simple editor for a project of mine, where I need to use an editable div using contenteditable property. I need two features: Auto insert hr after two enters Create a paragraph instead of <br> on enter and focus on it. So I wrote this (

JSON does not load in IE7 & amp; 8

My JSON content loads in all browsers except IE7 & 8, I'm not sure why it isn't working, the following is the code, any ideas? Thanks! $(document).ready(function() { function loadContent(){ $.ajax({ url: "json/content.json", data: "noca

All jQuery mobile events shooting twice

I have a very simple use case on my index page. <script src="js/jquery-min.js"></script> <script src="js/jquery-mobile.js"></script> <script type="text/javascript" src="cordova-2.2.0.js"&g

jQuery Mobile strange animated background when it should not

Ok, I dont know why and I have not done anything that should make it animate the screen up with the word LOADING but when I slide my finger up on the screen I get like a bottom toolbar/footer that shows the word loading here is my code you will see n

django + tagging with jquery

I want to use jQuery and create a tagging interface for users. Similar to how users in StackOverflow can add tags for the type of question they are asking. I'm getting it to work using jQuery and tagit: http://jquery.webspirited.com/2011/02/jquery-ta

View / Edit HTML form

I have a form thats displays data, i want it to behave as an html form as well, when user clicks 'Edit' the fields would become editable and on save the form will be submitted. any pointers to the implementation?try this $(document).ready({ var span_

Jquery rel toggle?

Is it possible to toggle (switch) a rel attribute in the same way that classes can be toggled in jquery? http://api.jquery.com/toggleClass/ I am trying to create a button, that when clicked will change(toggle) the rel attribute of another button. Hop

Is it ok to ungroup and link a function in a click?

If I have a function that does something within a click event, is it correct to unbind that function and then rebind? Currently I have a function that popsup when click a button. It will resize and everything, but it works well within the function. M

asp.net jquery fancybox - & gt; Close fancybox via codebehind

Ok, so I have seen this solution to closing a fancybox via a button click. : $.fancybox.close(); Is there a way that any one is aware of that a fancybox can be closed from the codebehind. The only thing I can think of is registering a script, because

How to get an image with an ajax query?

There is some .php file, that returns .png image file. How to get this image with jQuery $.ajax() ? Also, is there were some mistakes with input parameters, .php file will return error in JSON way. How to understand, which infomation was returned - i

When the JQuery change function is triggered

I am using Jquery to set some flag whenever input elements value get changed. I wrote a simple script which is working fine but I observed that the function get called only when control get out of the input element.If user types something and keeps t