milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
      • Côte d'Azur 2024
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home

Slider

Details
Written by: Stanko Milosev
Category: jQuery
Published: 16 September 2014
Last Updated: 16 September 2014
Hits: 4732

Here you can download my example of the slider.

HTML:

<!DOCTYPE html>
<html>

	<head>
		<script type="text/javascript" src="/index.js"></script>
		<script type="text/javascript" src="/knockout-3.2.0.js"></script>
		<script type="text/javascript" src="/jquery-2.1.1.js"></script>
		<script type="text/javascript" src="/jquery-ui.js"></script>
		<link href="/jquery-ui.css" rel="stylesheet"></link>
	</head>

	<body onload="startSlider()">
		<h2 class="demoHeaders">Slider</h2>
		<div id="slider"></div>
	</body>

</html>

JS:

var startSlider = function () {
	$( "#slider" ).slider({
		range: "min"
	});
}

Example taken from here, and here.

HTML5 example:

<!DOCTYPE html>
<html>

	<head>
	</head>

	<body>
		<input type="range" name="points" min="0" max="10">
	<body>
	
</html>

Example taken from here.

Change page in the middle of Ajax request

Details
Written by: Stanko Milosev
Category: jQuery
Published: 31 May 2013
Last Updated: 31 May 2013
Hits: 4352

So, I had a problem where ajax call was started, but user changed the page, and after ajax call was finished some js script will be executed and inf bubble will be shown to the user, in a place where it shouldn't be.

To check if page has changed you can use hash of a page:

$(window).hashchange(function () {
	self.xhr.abort();
	console.log("abort");
});

Test self.xhr.abort() is actually aborting ajax call...

Checking whether a click event was triggered by physically mouse clicking or not

Details
Written by: Stanko Milosev
Category: jQuery
Published: 29 May 2013
Last Updated: 29 May 2013
Hits: 4022
$('#button').click(function (e) {
    if (e.clientX) {
        // physical click
    } else {
        // program click
    } 
});

From here.

Do not select hidden type

Details
Written by: Stanko Milosev
Category: jQuery
Published: 23 May 2013
Last Updated: 23 May 2013
Hits: 4369

As much as I understood, razor's

@Html.CheckBox("myInputName", false)

Will create HTML like:

<input id="myInputName" name="myInputName" type="checkbox" value="true" checked="checked">

<input name="myInputName" type="hidden" value="false" checked="checked">

If you want with jQuery to select just input which is not hidden, use following code:

$('input[name=myInputName]:not([type=hidden])'
  1. Change form post method
  2. Send a string
  3. Few tips
  4. Unobtrusive validation

Subcategories

C#

Azure

ASP.NET

JavaScript

Software Development Philosophy

MS SQL

IBM WebSphere MQ

MySQL

Joomla

Delphi

PHP

Windows

Life

Lazarus

Downloads

Android

CSS

Chrome

HTML

Linux

Eclipse

Page 64 of 164

  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68