Skip to content
Advertisement

Tag: jquery

how to detect if variable is a string

How can I detect if a variable is a string? Answer This is the way specified in the ECMAScript spec to determine the internal [[Class]] property. From 8.6.2 Object Internal Properties and Methods: The value of the [[Class]] internal property is defined by this specification for every kind of built-in object. The value of the [[Class]] internal property of a

How to disable scrolling temporarily?

I’m using the scrollTo jQuery plugin and would like to know if it is somehow possible to temporarily disable scrolling on the window element through Javascript? The reason I’d like to disable scrolling is that when you scroll while scrollTo is animating, it gets really ugly 😉 Of course, I could do a $(“body”).css(“overflow”, “hidden”); and then put it back

set option “selected” attribute from dynamic created option

I have a dynamically created select option using a javascript function. the select object is when the js function is executed, the “country” object is and displaying “Indonesia” as default selected option. note : there is no selected=”selected” attribute in that option. then I need to set selected=”selected” attribute to “Indonesia”, and I use this using firebug, I can see

Download a file by jQuery.Ajax

I have a Struts2 action in the server side for file downloading. However when I call the action using the jQuery: in Firebug I see the data is retrieved with the Binary stream. I wonder how to open the file downloading window with which the user can save the file locally? Answer 2019 modern browsers update This is the approach

Advertisement