Web Analytics Made Easy -
StatCounter Note working Target blank properly when using biggerlink jQuery plugin v 1.0 - CodingForum


No announcement yet.

Note working Target blank properly when using biggerlink jQuery plugin v 1.0

  • Filter
  • Time
  • Show
Clear All
new posts

  • Note working Target blank properly when using biggerlink jQuery plugin v 1.0

    hi Pals,
    I have a problem regarding the "target" attribute of "a" tag. in my code I use biggerlink jQuery script to give link to p element without come HTML validation problem. I pass the "target" value from PHP to smarty template , but it's not working , When I remove "biggerlink " it works but the link in <p> tag not working . My Tpl file is :

    {if not empty($campaign)}
    <div class="securti-adv biggerlink">
    	{if not empty ($campaign.media)}
    		<a href="{$campaign.url}" [highlight]{if n($campaign.linkTarget)}target="{$campaign.linkTarget}"{/if}[/highlight] class="thumb">
    			<img src="{$campaign.image}" title="{$campaign.title1 + $campaign.title2}" alt="{$campaign.title1 + $campaign.title2}" />	</a>
    	<div class="details">
    		{if not empty ($campaign.title1) || not empty ($campaign.sub_title)}
    			<a href="{$campaign.url}" [highlight]{if not empty($campaign.linkTarget)}target="{$campaign.linkTarget}"{/if}[/highlight] title="{$campaign.title1 + $campaign.title2}">
    				 {text2image styleSlug=$campaign.titleStyle1 text=$campaign.title1}
    				 {text2image styleSlug=$campaign.titleStyle2 text=$campaign.title2}
    				 <span><img src="{$imagesDir}/btn-campaign-meet-security-advisor.png" alt="" title="" /></span>
    			[highlight]<p> {text2image styleSlug=$campaign.subtitleStyle text=$campaign.subTitle}</p>[/highlight]
    <script type="text/javascript" language="javascript">

    My plugin code is :

    (function($) {
    	$.fn.biggerlink = function(options) {
    		// Default settings
    		var settings = {
    			hoverclass:'hover', // class added to parent element on hover
    			clickableclass:'hot', // class added to parent element with behaviour
    			follow: true	// follow link? Set to false for js popups
    		if(options) {
    			$.extend(settings, options);
    			 return $('a',this).length > 0;
    			// Add title of first link with title to parent
    			$(this).attr('title', $('a[title]:first',this).attr('title'));
    			// hover and trigger contained anchor event on click
    				window.status = $('a:first',this).attr('href');
    				window.status = '';
    			// triggerable events on anchor itself
    				$(this).parents('.'+ settings.clickableclass).addClass(settings.hoverclass);
    				$(this).parents('.'+ settings.clickableclass).removeClass(settings.hoverclass);
    				if(settings.follow == true)
    					window.location = this.href;
    				e.stopPropagation(); // stop event bubbling to parent
    				$(this).parents('.'+ settings.clickableclass).find('a:first').trigger('click');
    				return false;
    		return this;

    the value of "target" , "_blank" is not work .... I highlight the code part regarding this, please check and give me a solution ASAP. You can mail me at : [email protected]