Skip to main content

Posts

jquery/js gliding/sliding navigation item effect

I'm trying to decipher effects like the one seen on http://www.htmldrive.net/items/demo/71/Dynamic-navigation-menu-with-scrolling-color-glide-followed-with-jQuery but I'm not very familiar with jquery/js (unless the code is all spelled out for me) I haven't been able to find many other examples of this menu effect (I'm probably using the wrong keywords). Can anyone help me figure out how these are generally created? I'd like to do so on my site (though with a thick underline instead of highlight). Thanks! edit- I realize I can just use one of these plugins, but I'd really like to understand what's going on/do my own

Bug with jquery-mobile: listview("refresh") and buttons, on Opera Mobile

I'm testing jquery-mobile with Opera Mobile browser. There are bugs, which are visible on both Opera Mobile Emulator and Opera Mobile on mobile device. On both they are occuring randomly (often, but not always). The most visible is with refreshing list with listview('refresh'); call. Sometimes the changes are not visible, and the pure HTML before the modifications is displayed. But after tapping the device the changes became visible. And also, some clicks on buttons does not work. Most of the time it works, but sometimes the button need to be pressed a few times. JQuery version is 1.6.4, jquery-mobile version is 1.0. Did you find similar bugs, or know what is causing them and how to prevent them? I think that jQuery-mobile is using some unstandard behaviour, which is working on other browsers, but is causing bug under Opera, because most of the apps works fine, but some are causing problems only under Opera/Opera Mobile.

JQuery - Output the class name of checked checkboxes

I am wondering whether or not it is possible to output the class name of checked checkboxes each time a checkbox is checked/unchecked? For example, I have 3 checkboxes. If I check one, it'll output its class name, if I then check a 2nd one it'll output the first checkbox class name + the 2nd class name. If I then uncheck the first checkbox, it'll only output the class name of the 2nd checkbox.. and so forth? I made a JSFiddle to get started... http://jsfiddle.net/LUtJF/ Thanks

why is that object declaration works in node.js and how to declare static variable?

i have seen this code : var myNet = require ("net"); and in some function: function foo (x,y) { var myNewNet = new myNet(); myNewNet.createServer(x,y); } why does the code above create a new object? what is the mechanism stands behind that? one more question, how do i create a static var in node.js, for example a id number that has to be unique. i came with this option for static variable: var id =0; and put it on the global scope, is it ok?

Jquery ajax functions stopped working

Ive been working on some jquery within a a page. Now all of a sudden the post functions seem to have stopped working? function deleteRow(OrderNo, LineNo) { alert(OrderNo + ";" + LineNo); $.ajax({ type: "POST", url: "Ajax.aspx/DeleteRow", data: '{' + 'OrderNo:"' + OrderNo + '",' + 'LineNo:"' + LineNo + '"' + '}', contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { //$("#item").val(msg); var data = jQuery.parseJSON(msg); if (!data.error) { $('#' + LineNo).remove(); } else { alert("Error" + " " + data.error); } }, error: function (msg) { alert('Failure: ' + msg); } }); }

Mocking a JSP"s post method versus creation an API

I have an requirement as per which I have to call an existing java function which is called from the UI through jsp. Data is provided from a form. I want to call that function from the java code. Should I create an API which should be called from the java code, and pass all the parameters required for the java function OR create a mock of the form(if its possible) and pass it to jsp. What is the recommended way?

I can call a no longer existing JS function but I can"t call new JS functions from my view

I have a problem regarding to a JavaScript function. I used to have a JS function located in a .js file which is also located in my project's NetBeans directory. I used to invoke that function from a view but later on I decided to change that function and add some new features to that function and call that new function from my view but it worked as in its past version and later on I changed that function's name which officialy means a function with the previous name was totally destroyed and this time I invoke my JS function from its new name and nothing worked. The funny thing is that, I again called that function with its previous name (again, it doesn't exists actually), it works as its past version although I have totally changed that function's name and officially a function with that name no longer exists in my file. What do you fellows think I should do? Yours ideas and helps are greatly appreciated...