Move to Hash Using JQuery – Three Cases

Sometimes we need to implement smooth jump for hash link click, we can do it in many ways using javascript or jquery. There are lots of jquery plugins to do that, here I am trying to write simple jquery tricks that handles some specific situation to handle jump or hash link click or tracking.

My Target:

  1. Jump based on window hash url
  2. Hash link click for same page
  3. Hash based external link

#1 Jump based on window hash url

First case: if user is visiting with a hash url , so our duty is to help the user jump to the hash id

#2 & 3# Jump based on click

Second and third case is user click on any user, it can be simple hash link or a link with hash at end, So, only hash as link should be for same page, but any valid link with hash at end should be another page or external page.

All three cases are handled in below code sample, Marked the 3 situation in code using #

I covered the situation when there is hash link or hash in url but the hash id or html element doesn’t exists

Another thing to consider, while we move the user to the hash id/html element without moving to screen to that vertical point, it’s better to move 90-100 px less so that user can see the html element more clear, in terms of ux.

https://gist.github.com/manchumahara/fdf41174a6ed79321978db91b85f8779

RSS news ticker using jquery and Slick RSS module in joomla

newstickerLet me clear first about what is Slick RSS

Slick RSS is a joomla module that Parse and Display RSS Feed News with DHTML Teaser Tooltip. For details pls visit this link.

ok , let me tell what I am going to do next. That module is great to show rss feed from another site and I want to use it as a news ticker and it can be named as rss news ticker. ok then let’s make it done.

I am going to use js library jQuery and it’s plugin BBCNewsTicker. Please download latest version of jquery and that plugin this the given link.

Now, install the module Slick RSS in your joomla site and publish in any module position. Now I am going to make little change in the module code so that it can be configured for newsticker.

open the file default.php from modules\mod_slick_rss\tmpl and check link near 39

Continue reading